Created attachment 173545 [details] Sample doc requires Charis SIL In the enclosed file, the first character in any IPA tone letters sequence is lost in the (enclosed) PDF generated.
Created attachment 173546 [details] Generated PDF
Created attachment 173547 [details] Charis SIL font
Repro. From what I gather the attached PDF is the *good* result. NixOS Version: 7.3.0.0.alpha0+ / LibreOffice Community Build ID: b1df9c67349cf4cc5be4128d797aefb87f50e38f CPU threads: 16; OS: Linux 5.13; UI render: default; VCL: x11 Locale: fi-FI (fi_FI.UTF-8); UI: en-US Calc: threaded
Created attachment 173691 [details] evince of pdf screenshot
Created attachment 173692 [details] firefox pdf viewer screenshot
Looking inside the PDF, the subset font of Charis is faulty. It looks like that referenced component glyphs are allocated ids and referenced within the glyph (in the glyf) table, but the extra glyphs are never actually added to the font. For example, in the Charis subset in the PDF, glyph 1 is a compound glyph that references glyph 59. But there are only 59 glyphs in the font (0 through 58) and so there is no glyph 59 to be referenced. Looking at the code in vcl, the glyfAdd function (fontsubset/ttcr.cxx) does the job of adding glyphs and references to the list of glyphs. But the calling code in CreateT42FromTTGlyphs (fontsubset/sfnt.cxx) (or is it CreateTTFromTTGlyphs?) does nothing with this. It only iterates over the nGlyphs it starts with. My thinking is that what is needed is an initial recursive iteration over all the glyphs to identify which need to be included. This will update nGlyphs. And only then to output all the tables.
*** This bug has been marked as a duplicate of bug 112152 ***