https://bugs.documentfoundation.org/show_bug.cgi?id=123234
--- Comment #14 from خالد حسني <[email protected]> --- I thought this is going to be a quick fix, but it is bit more complicated. OpenType fonts contain a CFF table describing glyph outlines, but when embedding fonts in PDF we convert CFF table to Type 1 fonts. CFF table uses what is called Type 2 Charstring format (Type 1 fonts use Type 1 format). The Type 2 spec has a deprecated section with this text: > endchar – adx ady bchar achar endchar (14) |– > > In addition to the optional width (see section 4.2, “Operator for Finishing a > Path” for more details) endchar may have four extra arguments that correspond > exactly to the last four arguments of the Type 1 charstring command “seac” > (see Type 1 Font Format book). The Type 1 charstring command argument asb is > not included because all sidebearings are considered to be zero and hence > unencoded in Type 2 charstrings. > > It is important to note the following restrictions which are the same as > those for Type 1 but frequently overlooked. > The bchar and achar refer to glyph names in StandardEncoding and not to any > current font encoding or re-encoding. This requires that a glyph name be > determined from bchar and achar via StandardEncoding and then the appropriate > charstring be located by that name. > > This construct can only be used to build glyphs from components named in > StandardEncoding. This construct may not be nested. So my first thought was to re-encode this deprecated use of endchar operator as seac operator, and this almost works except when achar and bchar are not part of the font subset already determined. At this level we can’t extend the font subset to include them (this has to be determined at much higher level that the code that can catch this endchar use), so the next fix is to decompose these accented glyphs and use the outlines of the bchar and achar directly in the subset font, but this is more involved than I can allocate time for right now. For code pointers, start at https://git.libreoffice.org/core/+/refs/heads/master/vcl/source/fontsubset/cff.cxx#890, if size() >= 4, then this is a deprecated use of endchar and figure out how to get the outlines of bchar and achar and adjust achar with adx and ady. -- You are receiving this mail because: You are the assignee for the bug.
