Bug 181166 - There should be an api to check if a character is defined in a font
Summary: There should be an api to check if a character is defined in a font
Status: CLOSED DUPLICATE of bug 32120
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.3   Edit
Hardware: All All
: P3 enhancement with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Silenio Quarti CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-04-05 06:38 EDT by Rob McKay CLA
Modified: 2015-07-06 14:36 EDT (History)
3 users (show)

See Also:


Attachments
Some code to check if a glyph exists for a given char (4.86 KB, text/plain)
2007-04-25 09:55 EDT, Rob McKay CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rob McKay CLA 2007-04-05 06:38:12 EDT
Currently there is no way to check if a character is defined for a given font.
There should be an API similar to the AWT Font.canDisplay(char c) or Font.canDisplay(int codePoint) methods.
Comment 1 Steve Northover CLA 2007-04-05 14:08:01 EDT
I know this is a dup but can't find it.
Comment 2 Rob McKay CLA 2007-04-25 09:55:42 EDT
Created attachment 64867 [details]
Some code to check if a glyph exists for a given char

Here is some (windows) code which could be added to the Font class to check if a char has a glyph.  It seems to work but there are probably better ways of doing it since it continually allocates windows objects which could probably be cached.
Comment 3 Rob McKay CLA 2007-04-26 04:21:30 EDT
I've found the duplicate after a lot of searching. It is 32120 - SWT Font or FontData should provide a method to query available glyph.
Comment 4 Brian de Alwis CLA 2015-07-06 14:36:23 EDT

*** This bug has been marked as a duplicate of bug 32120 ***