1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:18:13 +00:00
serenity/Userland/Libraries/LibPDF/Fonts
Nico Weber dde11e1757 LibPDF: Ignore unknown CFF operators
https://adobe-type-tools.github.io/font-tech-notes/pdfs/5177.Type2.pdf
says "The behavior of undefined operators is unspecified." but
https://learn.microsoft.com/en-us/typography/opentype/spec/cff2
says "When an unrecognized operator is encountered, it is ignored and
the stack is cleared."

Some type 0 CIDFontType0C fonts (i.e. CID-keyed non-OpenType CFF fonts)
depend on the latter, even though they're governed by the former spec.

Fixes rendering of text in 0000521.pdf (e.g. page 10 or 5). The font
there has a bunch of 0 opcodes for some reason.
2024-02-18 08:40:04 +00:00
..
CFF.cpp LibPDF: Initial support for drawing CFF-based Type0 fonts 2024-02-16 12:41:10 -05:00
CFF.h LibPDF/CFF: Compute per-glyph glyph width in CID-keyed fonts 2024-02-16 12:41:10 -05:00
PDFFont.cpp LibPDF: Add some scaffolding for type 3 fonts 2023-11-17 19:47:53 +00:00
PDFFont.h Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
PS1FontProgram.cpp Everywhere: Use to_number<T> instead of to_{int,uint,float,double} 2023-12-23 20:41:07 +01:00
PS1FontProgram.h Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
SimpleFont.cpp LibPDF: Scale default glyph width by font size and x scale 2024-02-12 14:32:04 +00:00
SimpleFont.h Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
TrueTypeFont.cpp LibPDF: Tweak vertical position of truetype fonts again 2024-02-01 10:05:40 +01:00
TrueTypeFont.h LibPDF: Pass Renderer to SimpleFont::draw_glyph() 2023-11-17 19:47:53 +00:00
Type0Font.cpp LibPDF: Add CIDFontType2::set_font_size() 2024-02-17 16:08:48 +01:00
Type0Font.h Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
Type1Font.cpp LibPDF/CFF: Store if a font program is CID-keyed 2024-02-15 12:32:31 +01:00
Type1Font.h LibPDF: Pass Renderer to SimpleFont::draw_glyph() 2023-11-17 19:47:53 +00:00
Type1FontProgram.cpp LibPDF: Ignore unknown CFF operators 2024-02-18 08:40:04 +00:00
Type1FontProgram.h LibPDF/CFF: Store if a font program is CID-keyed 2024-02-15 12:32:31 +01:00
Type3Font.cpp LibPDF: Add an initial implementation of type 3 glyph rendering 2023-11-17 19:47:53 +00:00
Type3Font.h LibPDF: Pass Renderer to SimpleFont::draw_glyph() 2023-11-17 19:47:53 +00:00