• 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: is glyph halfwidth or fullwidth
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: is glyph halfwidth or fullwidth


  • Subject: Re: is glyph halfwidth or fullwidth
  • From: John Stiles <email@hidden>
  • Date: Wed, 16 Mar 2005 10:49:00 -0800

Is this for rendering Japanese? That's the only example I can think of where monospaced fonts have half-width characters.
At any rate, I think you could just make a list of all the Unicode codepoints that are halfwidth, and see if your codepoint is in that list.



On Mar 16, 2005, at 10:42 AM, Simon Strandgaard wrote:

I'm rendering monospaced unicode text.

I want to determine if a glyph is either halfwidth of fullwidth.


On linux I have previously used wcwidth for this, but wcwidth on macosx seems to return either -1 or 1.


I have tried alternatives such as

NSSize size = [font advancementForGlyph:glyph];

and

NSSize size = [glyphstr sizeWithAttributes:attrs];



How can I tell if a glyph is halfwidth or fullwidth ?

--
Simon Strandgaard
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40blizzard.com


This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: is glyph halfwidth or fullwidth
      • From: Simon Strandgaard <email@hidden>
References: 
 >is glyph halfwidth or fullwidth (From: Simon Strandgaard <email@hidden>)

  • Prev by Date: Re: Finding number of processors
  • Next by Date: Re: Finding number of processors
  • Previous by thread: is glyph halfwidth or fullwidth
  • Next by thread: Re: is glyph halfwidth or fullwidth
  • Index(es):
    • Date
    • Thread