• 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: UILabel HTML to attributed string conversion: odd font choice for <em> text
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: UILabel HTML to attributed string conversion: odd font choice for <em> text


  • Subject: Re: UILabel HTML to attributed string conversion: odd font choice for <em> text
  • From: Jens Alfke <email@hidden>
  • Date: Tue, 17 Dec 2013 13:04:58 -0800

On Dec 17, 2013, at 10:44 AM, Steve Christensen <email@hidden> wrote:

> This seems odd to me since there's a perfectly fine Avenir Next Medium Italic available. Is this an expected font choice for italic text given the setup above

That seems wrong to me too.

I just experimented in TextEdit on OS X 10.9 — created some text in Avenir Next Medium, then italicized one word. It came out Avenir Next Italic (not Medium Italic), which is slightly wrong (too light) but not as wrong as what you got on iOS.

My best guess is that the metadata in the fonts themselves is wrong: maybe Medium Italic doesn’t have the same weight value as Medium.

> and, more importantly, is there a way for me to end up with an attributed string that's using the italic version of the base font short of manually walking each of the attribute runs and "correcting" the font?

You could try creating some CSS to define a custom font/style mapping, then insert that into the HTML…

—Jens
_______________________________________________

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


  • Follow-Ups:
    • Re: UILabel HTML to attributed string conversion: odd font choice for <em> text
      • From: Steve Christensen <email@hidden>
References: 
 >UILabel HTML to attributed string conversion: odd font choice for <em> text (From: Steve Christensen <email@hidden>)

  • Prev by Date: Re: Best solution for game loop on OSX?
  • Next by Date: Re: UILabel HTML to attributed string conversion: odd font choice for <em> text
  • Previous by thread: UILabel HTML to attributed string conversion: odd font choice for <em> text
  • Next by thread: Re: UILabel HTML to attributed string conversion: odd font choice for <em> text
  • Index(es):
    • Date
    • Thread