Welcome Guest Search | Active Topics | Sign In | Register

Using fonts with a space in the name Options
Rob Parmenter
Posted: Wednesday, April 1, 2020 7:29:00 PM
Rank: Newbie
Groups: Member

Joined: 3/16/2014
Posts: 8
I am trying to use a specific font ("Galano Grotesque") in the PDF I am generating. It is installed in the system.

When I use the font name "Galano Grotesque" in the AcmText.Style.FontName the font doesn't work and reverts to the default font.

If I open the created PDF in Adobe Illustrator I can see that the font name has been changed to "Galano#20Grotesque". If I put it back to the correct name (eg: "Galano Grotesque" or "Galano Grotesque Bold") the pdf displays correctly.

If I do a listing of fonts on the system it shows the Galano font as:

GalanoGrotesque-Bold
GalanoGrotesque-Regular

eg:
InstalledFontCollection installedFontCollection = new InstalledFontCollection();
FontFamily[] fontFamilies = installedFontCollection.Families;

int count = fontFamilies.Length;
for (int j = 0; j < count; ++j)
{
familyName = fontFamilies[j].Name;
}

I've tried using the FontName as "GalanoGrotesque-Regular" but that doesn't work either. I've tried "GalanoGrotesque" also.

Currently on eo.PDF version 19.2.91.0 and working in c# .Net.

Any help of what I can do to get the font displaying correctly would be appreciated.

Rob

code:

AcmBlock ssHeading = new AcmBlock(ReturnContentBlock( content: "Product", bold: true, fontname: "Galano Grotesque")) { StyleName = DocumentStyle.Heading1.ToString() };
section.Children.Add(ssHeading);




Functions

public AcmBlock ReturnContentBlock(string content, bool bold = false, string fontname = "Galano Grotesque", AcmHorizontalAlign align = AcmHorizontalAlign.Left, float? size = null)
{
AcmBlock block = new AcmBlock();
AcmText detail = new AcmText(content) { AutoTrim = false };
if (bold) detail.Style.FontStyle = FontStyle.Bold;
if (size != null) detail.Style.FontSize = size;
detail.Style.FontName = fontname;
detail.AutoTrim = false;
block.Children.Add(detail);
block.Style.HorizontalAlign = align;
return block;
}
eo_support
Posted: Friday, April 3, 2020 6:11:54 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,217
Hi,

We have tested this with the DEMO font we downloaded online on our latest build (20.0.81) and it seems to work fine. Specifically:

1. We installed the ttf version, not the otf version. otf version contains OpenScript font data which we do not support;
2. When we enumerate system font, we get "Galano Grotesque DEMO", neither "GalanoGrotesque DEMO", nor "GalanoGrotesque DEMO Bold", even though the demo font we installed is the bold style;
3. In the test code, we use "Galano Grotesque";

If you still have problems and if you can send us the font file, we will be happy to test again here.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.