Re: Need Help!!Font Family Name is not coming as needed.

2023-08-24 Thread Werner LEMBERG
 
> Looking more closely at code I think freetype is returning preferred
> Family name of font as font family if that is present inside font.
> Is there anyway to know if the font name is picked from preferred
> Family name or Family only.

No, there isn't.  Why do you need that?

You can either use `FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY` and/or
`FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY` to enforce the old
four-faces-per-family scheme, or you can parse the 'name' table by
yourself, see `FT_Get_Sfnt_Name`.


   Werner



RE: Need Help!!Font Family Name is not coming as needed.

2023-08-24 Thread Jain, Ankit
Hello,

Looking more closely at code I think freetype is returning preferred Family 
name of font as font family if that is present inside font.
Is there anyway to know if the font name is picked from preferred Family name 
or Family only.

Thanks,
Ankit Jain
CSF Development
T:  +91.124.392.7500/4683
C: +91 9871221546
E: ankit.ja...@fisglobal.com
FIS | Empowering the Financial World [cid:image001.png@01D9D6BA.C7CECBE0] 
 [cid:image002.png@01D9D6BA.C7CECBE0] 
 [cid:image003.png@01D9D6BA.C7CECBE0] 


From: Jain, Ankit
Sent: Wednesday, August 23, 2023 5:04 PM
To: freetype@nongnu.org
Subject: Need Help!!Font Family Name is not coming as needed.

Hi ,

I am using FT_FaceRec_ object to get the font family name in my code. But not 
getting the correct (entire font name as family name) for few fonts.
For e.g. Arial Black .Freetype is returning font name as Arial and Style as 
Black.
On further looking at code I found it goes into the check for 
TYPOGRAPHIC_FAMILY and return the valid string as Arial and
didn't execute the condition with FONT_FAMILY.
Is there is any way I can know if the font family name  has TYPOGRAPHIC_FAMILY 
or FONT_FAMILY.

Thanks,
Ankit Jain
CSF Development
T:  +91.124.392.7500/4683
C: +91 9871221546
E: ankit.ja...@fisglobal.com
FIS | Empowering the Financial World [cid:image001.png@01D9D6BA.C7CECBE0] 
 [cid:image002.png@01D9D6BA.C7CECBE0] 
 [cid:image003.png@01D9D6BA.C7CECBE0] 


The information contained in this message is proprietary and/or confidential. 
If you are not the intended recipient, please: (i) delete the message and all 
copies; (ii) do not disclose, distribute or use the message in any manner; and 
(iii) notify the sender immediately. In addition, please be aware that any 
message addressed to our domain is subject to archiving and review by persons 
other than the intended recipient. Thank you.


Re: Need Help!!Font Family Name is not coming as needed.

2023-08-23 Thread Werner LEMBERG


> I am using FT_FaceRec_ object to get the font family name in my
> code. But not getting the correct (entire font name as family name)
> for few fonts.  For e.g. Arial Black, Freetype is returning font
> name as Arial and Style as Black.  On further looking at code I
> found it goes into the check for TYPOGRAPHIC_FAMILY and return the
> valid string as Arial and didn't execute the condition with
> FONT_FAMILY.  Is there is any way I can know if the font family name
> has TYPOGRAPHIC_FAMILY or FONT_FAMILY.

You have to follow the rules given in the OpenType specification.
Have a look at 

  https://learn.microsoft.com/en-us/typography/opentype/spec/name
  https://learn.microsoft.com/en-us/typography/opentype/spec/recom#name


Werner