On Sat, 28 Dec 2019, Andi Friess wrote:
Hello, i think there is a problem with definiton of HumanFriendlyName and PostScriptName. it looks like the Arial font is the default (parent font) under windows. But the name Arial is not correct, it should be translated to the correct PostScriptFontName = ArialMT. Because a search in Font(Fontname) is as search with the postscriptname and not with the human readable Font name. Actual i have fixed this for me with fnt := gTTFontCache.FindFont(AFontName); // we are doing a PostScript Name lookup (it contains Bold, Italic info) in function TFPReportExportPDF.FindFontIndex(const ADoc: TPDFDocument; const AFontName: string): integer; but i think, this is not the soloution. It should be done in the prepaering of the report.
During preparation, the font name is not necessarily searched. It's only when actually rendering that you may need to search the font. For HTML output for instance, fonts are not searched. I changed the name of the default font to ArialMT, and the PDF renderer now first searches for the postscript name and then for the human-readable name. Michael. _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal