mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-29 19:10:26 +00:00
3e707efdfa
https://adobe-type-tools.github.io/font-tech-notes/pdfs/T1_SPEC.pdf, 8.4 First Four Subrs Entries: """If Flex or hint replacement is used in a Type 1 font program, the first four entries in the Subrs array in the Private dictionary must be assigned charstrings that correspond to the following code sequences. If neither Flex nor hint replacement is used in the font program, then this requirement is removed, and the first Subrs entry may be a normal charstring subroutine sequence. The first four Subrs entries contain: Subrs entry number 0: 3 0 callothersubr pop pop setcurrentpoint return """ othersubr handler 0 gets three arguments: * The flex height (the distance after which the bezier splines are replaced with just straight lines) * The current position after the flex It pushes that position on the postscript stack, where predefined subr handler number 0 then pops it from. It then passes it to setcurrentpoint. In theory, we now correctly do that setcurrentpoint call, which we previously weren't. In practice, that setcurrentpoint call always receives the last point of the flex -- and our path api apparently gets confused when move_to() is called on it when the current point is already at that same location. So tweak the SetCurrentPoint handler to not set the current point on the path if it's already the path's current point, with a FIXME to figure out what exactly is happening in Gfx::Path. No big behavior change if flex is used, but this is more correct if it isn't. (This only works because our `return` handler is empty, else we would have to make the callothersubr handler start a call frame.) |
||
---|---|---|
.. | ||
Fonts | ||
CMakeLists.txt | ||
ColorSpace.cpp | ||
ColorSpace.h | ||
CommonNames.cpp | ||
CommonNames.h | ||
Document.cpp | ||
Document.h | ||
DocumentParser.cpp | ||
DocumentParser.h | ||
Encoding.cpp | ||
Encoding.h | ||
Encryption.cpp | ||
Encryption.h | ||
Error.h | ||
Filter.cpp | ||
Filter.h | ||
Forward.h | ||
Interpolation.cpp | ||
Interpolation.h | ||
Object.h | ||
ObjectDerivatives.cpp | ||
ObjectDerivatives.h | ||
Operator.h | ||
Page.cpp | ||
Page.h | ||
Parser.cpp | ||
Parser.h | ||
Reader.cpp | ||
Reader.h | ||
Reference.h | ||
Renderer.cpp | ||
Renderer.h | ||
Value.cpp | ||
Value.h | ||
XRefTable.h |