Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 27. Text Display and Input > Determining Glyph Availability

27.7. Determining Glyph Availability

To determine whether a specific embedded font has a glyph for a specific character or set of characters, we use the Font class's instance method hasGlyphs( ). When provided with a string argument, the hasGlyphs( ) method returns a Boolean value indicating whether the font has all the glyphs required to display that string.

The Font class's instance method hasGlyphs( ) works with embedded fonts only. There is no way to determine whether a given device font has a glyph for a specific character.



  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint