Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4551916
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T16:42:10+00:00 2026-05-21T16:42:10+00:00

I was trying to draw some text with a downloaded font. I looked at

  • 0

I was trying to draw some text with a downloaded font. I looked at API documentation and searched the Web. I found a solution, but the problem is that it’s applicable to only the CoreGraphics level framework. So I searched for a way to convert CGFont to UIFont, but there was no way to do this.

I realized UIFont and CGFont/CTFont are separated completely, even though they’re created from same font file. CGFont and CTFont are convertible from/to each other, but for UIFont, the only way is recreating with its attributes like name and size. And applicable codes are also separated.

For instance, CATextLayer accepts only CGFont/CTFont — no UIFont. But all UIKit controls accept only UIFont.

Why does this separation exist? Or am I wrong? (Any way to use a downloaded font in UIKit classes?)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T16:42:11+00:00Added an answer on May 21, 2026 at 4:42 pm

    The short answer : “Only Apple folks knows”

    The more detailed answer, after digging (reversing) frameworks a bit:

    • UIKit.framework doesn’t use at all CGFont type
    • UIKit.framework use instead CoreText CTFont and GSFont…
    • GSFont comes from… the GraphicsServices private framework
    • GraphicsServices… use CGFont

    So here is my guess (Might be completely wrong) :

    • UIFont > GSFont(Private) > CGFont
    • UIKit > GraphicsServices > CoreGraphics :

      At least Concerning fonts, Apple engineers have set up an abstraction layer between UIKit
      and CoreGraphics frameworks, via the obscur GraphicsServices one.

    • iOS > iOS (Private) > Mac OSX :

      Why they did this, I would say CoreGraphics, which comes from Mac OSX, wasn’t optimal for iOS devices, and UIKit being iOS only, they added a layer between both apis. Or more generally they plan one day to separate completely UIKit from CoreGraphics… iOS from Mac OSX… Who knows! The apple folks does, my short answer 🙂

    About using custom fonts with UIKit, you might be interested reading this.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to draw some text on the iPhone, but in landscape mode, where
I'm trying to draw some text in the corner of a rectangle but I
I am trying to draw some text with CoreGraphics. Unfortunately there is no method
I'm trying to simply draw some text with a stroke and then apply a
I am trying to draw a series of rectangles using OpenGL but some of
I am trying to draw some text in my CPView, I have this: -
I'm trying to draw text with some part of it in different color First
I've got a little text drawing puzzle under Win32. I'm trying to draw some
I'm trying to draw some text onto an MapView on Android. The drawing of
I'm trying to draw some circle overlays containing text on MKMapView. I have subclassed

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.