Home » U++ Library support » U++ Libraries and TheIDE: i18n, Unicode and Internationalization » Basic character set analyzer
Basic character set analyzer [message #19546] |
Sat, 13 December 2008 11:26 |
cbpporter
Messages: 1401 Registered: September 2007
|
Ultimate Contributor |
|
|
Before starting to write a text output method capable of font substitution, using a little program to see what fonts contain which characters is a good idea (Mirek's idea).
I've already gotten a lot of valuable information from this little program, so if anybody want to give it a try, run it and post it's result here (or as PM if you don't want to fill up the space here) so I can tell if my assumptions hold out for different versions of Linux, that would be great. I would like to see results both from people who just installed a normal Linux, never bothering to look over the font list and from people who have a localized version of Linux or who manually installed a font to be able to use non English characters.
The program covers code ranges from Basic Latin to Arabic. I did not go any farther yet, because clearly a better interface and way to present information is needed (I'm thinking tables, ranges and percents vs. current character list). But this will be enough to verify my assumptions and write a basic method which will handle for now only the above code ranges.
PS:
To make this work, you are going to have to add this to Draw/Draw.h in FontInfo declaration:
bool HasChar(int codePoint);
bool HasCharRange(int startCp, int endCp);
bool CharRangeEmpty(int startCp, int endCp);
and this to Draw/DrawText.cpp:
bool FontInfo::HasChar(int codePoint)
{
return XftCharExists(Xdisplay, ptr->xftfont, codePoint);
}
bool FontInfo::HasCharRange(int startCp, int endCp)
{
for (int i = startCp; i <= endCp; i++)
if (!XftCharExists(Xdisplay, ptr->xftfont, i))
return false;
return true;
}
bool FontInfo::CharRangeEmpty(int startCp, int endCp)
{
for (int i = startCp; i <= endCp; i++)
if (XftCharExists(Xdisplay, ptr->xftfont, i))
return false;
return true;
}
These methods are not final, so add them only for the purpose of running this test.
|
|
|
|
|
Basic character set analyzer
|
|
|
Re: Basic character set analyzer
|
|
|
Re: Basic character set analyzer
|
|
|
Re: Basic character set analyzer
By: mirek on Thu, 18 December 2008 11:34
|
|
|
Re: Basic character set analyzer
|
|
|
Re: Basic character set analyzer
By: mirek on Sat, 24 January 2009 14:00
|
|
|
Re: Basic character set analyzer
|
|
|
Re: Basic character set analyzer
By: mirek on Sun, 25 January 2009 10:56
|
|
|
Re: Basic character set analyzer
|
|
|
Re: Basic character set analyzer
By: mirek on Fri, 30 January 2009 08:53
|
|
|
Re: Basic character set analyzer
|
|
|
Re: Basic character set analyzer
By: mirek on Fri, 30 January 2009 09:28
|
|
|
Re: Basic character set analyzer
|
|
|
Re: Basic character set analyzer
|
|
|
Re: Basic character set analyzer
By: mr_ped on Sat, 31 January 2009 14:18
|
|
|
Re: Basic character set analyzer
|
|
|
Re: Basic character set analyzer
|
|
|
Re: Basic character set analyzer
By: mirek on Mon, 02 February 2009 09:40
|
|
|
Re: Basic character set analyzer
|
|
|
Re: Basic character set analyzer
By: mirek on Sat, 07 February 2009 14:53
|
|
|
Re: Basic character set analyzer
|
|
|
Re: Basic character set analyzer
|
|
|
Re: Basic character set analyzer
By: mirek on Mon, 09 February 2009 08:47
|
|
|
Re: Basic character set analyzer
|
|
|
Re: Basic character set analyzer
By: mirek on Mon, 09 February 2009 08:42
|
Goto Forum:
Current Time: Mon Apr 29 07:09:04 CEST 2024
Total time taken to generate the page: 0.04568 seconds
|