1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-15 06:54:57 +00:00
serenity/Userland/Libraries/LibGfx/Font
Nico Weber 78b3c552c2 LibGfx: Tweak semantics of some SkipTables enum values
It turns out that hmtx and OS/2 table values _are_ used when
rendering OpenType for PDFs: hmtx is used for the left-side bearing
value (which is read in `Painter::draw_glyph()`), and OS/2 is used
for the ascender, which Type0's CIDFontType2::draw_glyph()
and TrueTypeFont::draw_glyph() read.

So instead of not trying to read these tables, instead try to read
them but tolerate them failing to read and ignore them then.

Follow-up to #23276.

(I've seen weird glyph positioning from not reading the hmtx table.
I haven't seen any problems caused by not reading the OS/2 table yet,
but since the PDF code does use the ascender value, let's read that
too.)
2024-02-21 19:52:03 +01:00
..
OpenType LibGfx: Tweak semantics of some SkipTables enum values 2024-02-21 19:52:03 +01:00
WOFF LibGfx/OpenType: Tweak Font::try_load_from_externally_owned_memory() 2024-02-21 13:38:33 +01:00
WOFF2 LibGfx: Use FourCC as OpenType::Tag type 2023-11-24 08:42:46 +01:00
BitmapFont.cpp Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
BitmapFont.h Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
Emoji.cpp Everywhere: Remove unused DeprecatedString includes 2023-04-09 22:00:54 +02:00
Emoji.h LibGfx+LibUnicode: Support specifying the path to search for emoji 2023-03-01 14:54:16 +00:00
Font.cpp LibGfx: Do not use divisions when calculating font subpixel offsets 2023-06-01 15:13:57 +02:00
Font.h LibGfx: Improve tie-breaking in Typeface::get_font 2023-11-09 16:09:18 +01:00
FontDatabase.cpp Everywhere: Use to_number<T> instead of to_{int,uint,float,double} 2023-12-23 20:41:07 +01:00
FontDatabase.h LibGfx+Userland: Move FontWeight enum into its own file 2024-01-21 09:32:10 -05:00
FontStyleMapping.h LibGfx: Add functions to convert font widths to/from strings 2023-07-20 08:02:12 +01:00
FontWeight.h LibGfx+Userland: Move FontWeight enum into its own file 2024-01-21 09:32:10 -05:00
ScaledFont.cpp LibGfx+LibWeb: Move Gfx::ScaledFont caching from LibWeb into LibGfx 2023-12-26 18:15:55 +01:00
ScaledFont.h LibGfx: Move POINTS_PER_INCH, DEFAULT_DPI to VectorFont.h 2024-02-15 22:53:24 -05:00
Typeface.cpp LibGfx+LibWeb: Move Gfx::ScaledFont caching from LibWeb into LibGfx 2023-12-26 18:15:55 +01:00
Typeface.h LibGfx: Convert FontDatabase APIs to use FlyString 2023-09-06 11:29:03 -04:00
UnicodeRange.h LibWeb+LibGfx: Move UnicodeRange from LibWeb to LibGfx 2023-12-10 17:32:04 +01:00
VectorFont.cpp LibGfx+LibWeb: Move Gfx::ScaledFont caching from LibWeb into LibGfx 2023-12-26 18:15:55 +01:00
VectorFont.h LibGfx: Move POINTS_PER_INCH, DEFAULT_DPI to VectorFont.h 2024-02-15 22:53:24 -05:00