a Courier fixed font for Eastern Europe languages -- resolved

For those with a need to use this tool with a Courier font that works for Eastern European (Polish, etc), I have finally found one that works well with PDF Include and codepage ISO8859-2.

PDF Include 3.3.3

Got the write-up and replacement pdf_inc.p here:

http://www.tv.com.pl/stepbystep/pdfinclude/ (thank you so very much, Tomasz Judycki !!)

This took care of the Helvetica and Times-Roman proportional fonts.

I then downloaded this package of ISO8859-2 fonts:

http://www.slovo.info/Download/l2ttf003.zip

which was listed on http://www.aatseel.org/resources/fonts/windows_central.htm

I renamed the courier fonts to courier_nl2*.ttf, then ran ttf2pt1 to create the afm's.

I then loaded the appropriate courier fonts needed in the pdf via pdf_load_font to embed the font in the .pdf.

Then just used that embedded font instead of courier and it worked like a charm.

For courier normal (not bold/italic/bold-italic), the .afm is only 13kb and the .ttf is 62kb, which was acceptable.

Note that this works with PDF Include 3.3.3. I tried to use the latest version (pdfinclude-3 branch) but there was a bug (Entry 0 outside range) when I tried to use the procedure pdf_set_base14_codepage and admittedly didn't spend a lot of time trying determine what was causing it and where.


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

pdf_set_base14_codepage -> pdf base fonts

Anyway as implies its name pdf_set_base14_codepage sets the codepage for the 14 PDF base fonts.
You do not need to use this API, try remove it from your code and it should work the same.
In fact, as the courier font is encoded in iso8859-2, it is sufficient just using it in order to have the special characters changed from iso8859-1 to iso8859-2.


indeed

I just tested, the following code shows "byco" (where the c is indeed the ccaron character)

{ pdf_inc.i "THIS-PROCEDURE"}
RUN pdf_new ("Spdf","test.pdf").
/* Load the iso8859-2 Courier bold italique font */
RUN pdf_load_font ("Spdf","CBI","cbi.ttf","cbi.afm","").
RUN pdf_new_page("Spdf").
RUN pdf_set_font ("Spdf","Arial",10.0).
RUN pdf_text("Spdf", "byèo").
RUN pdf_close("Spdf").

So I confirm: in your case, no need of pdf_set_base14_codepage

By the way I'd like to know what you did to get this "entry 0 out of list" error... may be there is a real bug there.


More details please

Hi

Can you give more details please (code snippet to reproduce the bug, call stack when occurs the bug...)?

pdfinclude-3 is used everyday in production environments, both with esatern europe and cyrilic characters without a problem; I'd glad to fix a remaining bug...

Thanks in advance

Jice