I suspect that the Arial font has unicode glyphs, and courier not.

I do not know, but with other fonts: Arial, Verdana, Consolas it works as expected. Do you think, that Courier New is only exception?

When I look at https://docs.microsoft.com/en-us/typography/font-list/courier-new I do not see there something special compared to other fonts ...

But my knowledge about font structures (and also about PDF internals) is minimal ...

I don't know much about TTF, but PDF should simply map characters to glyphs
found in the TTF.

Because how is the PDF generator supposed to know that it should transcode your text to latin 2 ?

I do not know if it is necesssary.

I have used FPDF port of PHP PDF library, which I have rewritten to pascal and there I can use "Courier New" font.
(in both ways as embedded and also when not embedded)


Probably FPDF handles PDF generation bit differently, but when I write into file any text in code page CP1250 and I embedd Courier New font (generated in advance by using makefont.php utility) then I get correct result.

So my raw guess was that it must be doable also using fcl-pdf somehow?

Possibly.

Graeme Geldenhuys wrote 99% of the PDF and TTF support, I suspect he can
tell us more.

I will ask.

Michael.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to