Quartz 2D can not draw Chinese Character ?

Discussion in 'iOS Programming' started by mars.tsang, Sep 20, 2009.

  1. mars.tsang macrumors newbie

    Joined:
    Nov 25, 2008
    #1
    When i tried to use Quartz 2d's CGContextShowGlyphsAtPoint or CGContextShowTextAtPoint to draw some chinese characters , i found the characters cann' t display ,but it's ok when there's only english characters .

    Does Quartz not support this ? Or i have missed something ?

    Hope someone can help.

    Thanks .
     
  2. firewood macrumors 604

    Joined:
    Jul 29, 2003
    Location:
    Silicon Valley
    #2
    Is there some reason you want to draw in Quartz instead of Cocoa Touch? If not, try using the NSString drawing methods instead.
     
  3. mars.tsang thread starter macrumors newbie

    Joined:
    Nov 25, 2008
    #3
    Thanks firewood!

    I use quartz mainly for a better performance cause i need to draw mass text , on the other side , i need to draw underline for some special string.
     
  4. PhoneyDeveloper macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #4
    I believe that quartz does not draw unicode text, only ascii or macroman. As suggested, use the UIStringDrawing.h methods. I don't think you should find any performance issues. However, you can't use UIKit from a background thread.
     

Share This Page