Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > BookFusion

Notices

Reply
 
Thread Tools Search this Thread
Old Today, 10:18 AM   #1
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 85,778
Karma: 154365285
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
WHen is BookFusion getting a proper weight adjustment?

When is BookFusion going to have proper font weight? There isn't a font weight adjustment and when there is, I don't want it done wrong like all the iOS programs that have a font weight adjustment.

This is from Ai, but it's spot on.
Quote:
"Kobo’s font weight slider doesn't map to CSS font-weight (400–900) or switch between static font files. Under the hood, Kobo uses FreeType’s FT_Outline_Embolden (plus stem-darkening/gamma adjustment) to mathematically dilate the vector outlines of a single Regular .ttf file before rasterization.

On iOS WKWebView, mapping a weight slider to CSS font-weight does nothing on static fonts until it hits 600 and snaps to an ugly faux-bold. To properly replicate Kobo’s smooth weight slider for static fonts in WebKit, the slider needs to adjust glyph stroke thickness smoothly—for example, by scaling a fractional -webkit-text-stroke (e.g., 0.005em to 0.04em currentColor) or subpixel text-shadow dilation—while only using font-variation-settings: 'wght' when a variable font is detected."
Quote:
How Kobo Actually Does It (Under the Hood)

Kobo’s Advanced Font Control weight slider does not rely on CSS font-weight numbers (400, 500, 600) or multi-weight font files. Instead, it operates directly inside Kobo's text rasterizer (FreeType / Adobe RMSDK):
1. Vector Outline Emboldening (FT_Outline_Embolden): Before a glyph is turned into pixels on the screen, FreeType takes the raw mathematical Bézier curves of the font's Regular face and mathematically dilates (expands) the outlines outward by a fractional pixel amount. Because it expands the vector curves before rasterization, the letterforms stay razor-sharp at any size without blurry edges.
2. Gamma & Stem-Darkening Adjustment: Kobo pairs that outline expansion with FreeType's stem darkening and gamma curve tuning, which boosts the subpixel/grayscale contrast of thin horizontal and vertical stems so they appear heavier and darker against the background without altering character spacing or line breaks.

Why iOS App Authors Get It Wrong (and How They Can Fix It)

Most iOS reading app developers simply bind their "Font Weight" slider to CSS font-weight: 100..900. On iOS (WKWebView), if a user loads a standard static .ttf file that only contains a Regular (400) face, WebKit ignores 450, 500, and 550, and then abruptly triggers an ugly synthetic faux-bold at 600+.

If an iOS developer wants to replicate Kobo’s smooth, continuous weight slider for any static font inside WKWebView, they can simulate vector emboldening using subpixel CSS stroke/shadow techniques rather than relying on font-weight:
  • Subpixel -webkit-text-stroke: Applying a fractional stroke width in em units (for example, -webkit-text-stroke: 0.015em currentColor expands the glyph outlines proportionally to the font size, mimicking FreeType's outline emboldening.
  • Subpixel text-shadow layering: Layering ultra-tight, zero-blur shadows (e.g., text-shadow: 0.01em 0 0 currentColor, -0.01em 0 0 currentColor thickens vertical stems smoothly in tiny increments (0.005em steps) without triggering WebKit's jarring faux-bold jump or changing word wrapping.
  • Variable Font wght Axis Fallback: When a user imports a true variable font (one with a wght axis), the slider can drive font-variation-settings: 'wght' <value> directly, reserving the -webkit-text-stroke / text-shadow dilation for static .ttf/.otf files.

Last edited by JSWolf; Today at 01:31 PM.
JSWolf is offline   Reply With Quote
Old Today, 12:42 PM   #2
skillachie
Addict
skillachie ought to be getting tired of karma fortunes by now.skillachie ought to be getting tired of karma fortunes by now.skillachie ought to be getting tired of karma fortunes by now.skillachie ought to be getting tired of karma fortunes by now.skillachie ought to be getting tired of karma fortunes by now.skillachie ought to be getting tired of karma fortunes by now.skillachie ought to be getting tired of karma fortunes by now.skillachie ought to be getting tired of karma fortunes by now.skillachie ought to be getting tired of karma fortunes by now.skillachie ought to be getting tired of karma fortunes by now.skillachie ought to be getting tired of karma fortunes by now.
 
skillachie's Avatar
 
Posts: 340
Karma: 511308
Join Date: Mar 2012
Device: Samsung Galaxy Tab 10" , Kindle Fire, Pixel 6"
Quote:
Originally Posted by JSWolf View Post
When is BookFusion going to have proper font weight? There isn't a font weight adjustment and when there is, I don't want it done wrong like all the iOS programs that have a font weight adjustment.

This is from Ai, but it's spot on.
Thanks for the details. We will look into this sometime next year
skillachie is offline   Reply With Quote
Advert
Old Today, 01:29 PM   #3
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 85,778
Karma: 154365285
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by skillachie View Post
Thanks for the details. We will look into this sometime next year
Thanks.

I cannot find an iOS reading app that does font weight properly, They all seem to go from normal to medium to semibold to bold based on what font weights are available in the font family. They don't do font weights properly the way Kobo does it.
JSWolf is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Proper font weight JSWolf justRead.app 1 Today 02:11 PM
Is Kobo the only e-reader to have font weight adjustment? JWez Which one should I buy? 9 09-24-2026 10:54 AM
A SIMPLE SOLUTION TO AMERICA’S WEIGHT PROBLEM: Banish Belly and Lose Weight DrDln Self-Promotions by Authors and Publishers 3 05-29-2017 02:26 PM
A SIMPLE SOLUTION TO AMERICA'S WEIGHT PROBLEM: Banish Belly and Lose Weight in 5 DrDln Self-Promotions by Authors and Publishers 0 05-20-2011 01:29 AM


All times are GMT -4. The time now is 04:41 PM.


MobileRead.com is a privately owned, operated and funded community.