freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft-devel] Variable fonts: hhea/typo/win metrics interpreted differe


From: Ben Wagner
Subject: Re: [ft-devel] Variable fonts: hhea/typo/win metrics interpreted differently for instances compared to static fonts?
Date: Fri, 1 Feb 2019 22:41:52 -0500

I believe that Chromium is using Skia's reported font metrics which are currently calculated at https://skia.googlesource.com/skia/+/00dcf668659ab26b8691c64a977fdd19e9e8df09/src/ports/SkFontHost_FreeType.cpp#1411 . The biggest issue is that historically (and as noted above) FT_Face would always use HHEA metrics if they weren't 0, and then fallback to usWin or typo and UseTypoMetrics wasn't looked at to change the priority. As a result Skia has code to look at the UseTypoMetrics bit and if set reads the values from the (FreeType generated) OS/2 table if available instead of using the FT_Face values. So if FreeType interpolates the TT_OS2.sTypo* values in the table it creates for an FT_Face then that should get picked up by any font which sets UseTypoMetrics. Any font which doesn't set UseTypoMetrics will get whatever the FT_Face says to do (except bitmap only fonts use FT_Face.size.metrics values).

I think it would be great for FreeType to look at the UseTypoMetrics bit. This would allow for the (eventual) simplification of the Skia code.

Le mer. 30 janv. 2019 à 20:21, Nikolaus Waxweiler <address@hidden> a écrit :
The short version is that Firefox and Chromium seem to directly access hhea and typo themselves. The patches seem to have no effect except that Chromium seems to react to freetype not blindly setting typo values in VF instances anymore, but only with small metrics changes.

GTK and Qt let text and UI elements compress if bit 7 is set and typo ascender plus descender < hhea ascender plus descender. I have no idea how much this is the result of theming in either toolkit and if it is what is supposed to happen. 

So.

Still not sure we want mvar typo deltas to modify currently active metrics?

... Merge and break out asbestos pants?
_______________________________________________
Freetype-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/freetype-devel

reply via email to

[Prev in Thread] Current Thread [Next in Thread]