1

I'm trying to use TTF-Fonts within libharu.

string arialtmp = doc.LoadTTFontFromFile("c:\\windows\\fonts\\ariali.ttf", true);
HPdfFont arial2 = doc.GetFont(arialtmp, "CP1250");

page.SetFontAndSize(arial2, 25);
page.BeginText();
page.MoveTextPos(50, 650);
page.ShowText("bla blaa!!");
page.EndText();

But libharu don't use ariali.ttf . I'm getting no compile error or anything else, libharu just don't use the font. I can also write damn.ttf and get the same result.

So what's wrong?

I'm using libharu with c# interface and Visual Studio 2010

Oded
  • 489,969
  • 99
  • 883
  • 1,009
  • 1
    Does the account running the application have permissions to read from that file location? Did you try copying the file to the program directory and loading it from there? – Oded Apr 05 '12 at 14:00
  • Are arialtmp and arial2 non-null at runtime? You wouldn't get a compile error. – Rup Apr 05 '12 at 14:08
  • @Oded: yes, it runs as admin. I'm using csc and VS command prompt to compile the file and mistyped the output file. So I executed the old EXE file again and again, how stupid is that. Thanks Oded and Rup for your help. Problem is "fixed" – user1315449 Apr 06 '12 at 11:36

0 Answers0