ststeiger / PdfSharpCore

Port of the PdfSharp library to .NET Core - largely removed GDI+ (only missing GetFontData - which can be replaced with freetype2)
Other
1.06k stars 235 forks source link

TrueType collection fonts are not yet supported? #169

Open mcguu opened 3 years ago

mcguu commented 3 years ago

I want to use Microsoft YaHei font.

but it tells me TrueType collection fonts are not yet supported? how to use this font?

AlexanderMagdysyuk commented 3 years ago

TTC should be repacked to separated TTF. There is the sample with GDI+: https://forum.pdfsharp.net/viewtopic.php?f=8&t=3976 - without GDI+ it is necessary to read the collection header manually and use the same logic (repack separated TTFs).