Skip to content

How to add a new font to support Cyrillic? #9

@ciukstar

Description

@ciukstar

Hello.

As I understand, the standard fonts provided by "Graphics.PDF.Fonts.Standard.Font" do not provide support for Cyrillic.
So I followed the HPDF/Test/onepage.hs example without success. The generated .pdf does not display Cyrillic text.
I have tried several other fonts besides DroidSans: OpenSans, DejaVuSans, FreeSerif, TimesNewRoman, all without success.

Note that I used fontforge to convert .ttf to .pfb and .afm files as below:
$ fontforge -lang=ff -c 'Open($1); Generate($2); Close();' DroidSans.ttf DroidSans.pfb
Some of them had issues with underscores (i.e. "_") and numeric digits (like "6") in .amf files when parsed with HPDF.

Is there anything else besides the example given on HPDF/Test/onepage.hs?
Or maybe it needs to be done in a completely different way?

Env:

LTS Haskell 19.22 (ghc-9.0.2)
HPDF 1.6.0

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions