• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Getting displayName out of font file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting displayName out of font file


  • Subject: Re: Getting displayName out of font file
  • From: "Gerriet M. Denkmann" <email@hidden>
  • Date: Sat, 27 Feb 2016 00:49:21 +0700

> On 27 Feb 2016, at 00:37, Alex Kac <email@hidden> wrote:
>
> Are you wanting this for any arbitrary font? I believe you can “install” a font just for your application - and then use the NSFont methods to get it.
>
> http://stackoverflow.com/questions/5283572/custom-font-in-a-cocoa-application

I do not want a fixed set of fonts to be included into my app. Rather I want my app to do things (to be precise: install them on my iOS devices) for any arbitrary font.
The solution suggested by Ken Thomases (CTFontManagerCreateFontDescriptorsFromURL ) works perfectly for me.

But thanks for the link - this might come in handy some other time.


Kind regards

Gerriet.

>
>> On Feb 26, 2016, at 10:31 AM, Jens Alfke <email@hidden> wrote:
>>
>> If this functionality exists it would probably be down in the CoreText framework. Take a look there.
>>
>> —Jens
>>
>>> On Feb 26, 2016, at 2:16 AM, Gerriet M. Denkmann <email@hidden> wrote:
>>>
>>> I have a file “Some Font.ttf” and I want to know the displayName of this font, which might be “Some-Font” or “Nice Font” or anything else.
>>> Or nil if this is not a well-formatted font file.
>>> I do NOT want to install the font nor do anything with it.
>>>
>>> Short of reverse-engeneering the ttf format (which probably would be rather too much): is there a way to get this?
>>>
>>> Ideally I would line to do:
>>> NSFont *font = [ NSFont fontFromFilePath: @“/path/to/Some Font.ttf” ];
>>> NSString *displayName = font.displayName;    //    font.fontName would probably also do
>>>
>>> but this seems not to exist.
>
> Alex Kac - El capitán
>


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


References: 
 >Getting displayName out of font file (From: "Gerriet M. Denkmann" <email@hidden>)
 >Re: Getting displayName out of font file (From: Jens Alfke <email@hidden>)
 >Re: Getting displayName out of font file (From: Alex Kac <email@hidden>)

  • Prev by Date: Re: Getting displayName out of font file
  • Next by Date: cycle windows
  • Previous by thread: Re: Getting displayName out of font file
  • Next by thread: Re: Getting displayName out of font file
  • Index(es):
    • Date
    • Thread