mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-22 04:25:13 +00:00
LibPDF: Give CFF Glyph 0 the name .notdef
This is required by the CFF spec, and is consistent with what we do for the encoding 24 lines down. As far as I can tell, nothing in `Type1FontProgram::rasterize_glyph()` or in Type1Font.cpp implements the "If an encoding maps to a character name that does not exist in the Type 1 font pro- gram, the .notdef glyph is substituted." line from the PDF 1.7 spec (in 5.5.5 Character Encoding, Encodings for Type 1 Fonts) yet, so this does yet have an effect.
This commit is contained in:
parent
0b457f90e0
commit
1cb450e9a3
Notes:
sideshowbarker
2024-07-16 21:39:23 +09:00
Author: https://github.com/nico Commit: https://github.com/SerenityOS/serenity/commit/1cb450e9a3 Pull-request: https://github.com/SerenityOS/serenity/pull/23264
1 changed files with 1 additions and 2 deletions
|
@ -251,8 +251,7 @@ PDFErrorOr<NonnullRefPtr<CFF>> CFF::create(ReadonlyBytes const& cff_bytes, RefPt
|
|||
auto cid = 0;
|
||||
TRY(cff->add_glyph(ByteString::formatted("{}", cid), move(glyphs[0])));
|
||||
} else {
|
||||
// FIXME: Shouldn't this use resolve_sid(0, strings) (".notdef") as name?
|
||||
TRY(cff->add_glyph(0, move(glyphs[0])));
|
||||
TRY(cff->add_glyph(".notdef", move(glyphs[0])));
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue