Home » U++ Library support » U++ Libraries and TheIDE: i18n, Unicode and Internationalization » Basic character set analyzer
Re: Basic character set analyzer [message #19903 is a reply to message #19890] |
Sat, 31 January 2009 13:22 |
cbpporter
Messages: 1401 Registered: September 2007
|
Ultimate Contributor |
|
|
I've made great progress today and all fonts are capable of displaying almost all Latin characters and compositions. There is one last problem and this is a big one.
Let's say that I'm trying to draw 'à' (a`). First I draw 'a', and then a '`'. With the new methods I added when I interrogate the font for the top and bottom of '`', I will get something in the vicinity of 2 for top (it doesn't start exactly at the top of the line) and something in the vicinity of 5 for bottom (these numbers are just for example). I need this info, rather then ascent/height. And it works for most fonts. But there are some fonts which will return 0 for the top and the height of the font for bottom. So instead of getting (2, 5), I will get (0, 18) and this ruins all computations and causes the diacritic to be severely misplaced. This is not the correct value for the API calls that I have made, and I think it is the fault of the font designer, who did not alter the vertical extent information of the character and just went with the default font height.
I hope I was successful in explaining this issue.
I don't know how I could fix this, safe for rendering the character in a white bitmap buffer, and shrinking the bitmap line by line until I have reached the minimal height and caching the result. I'm afraid such a method will be slow, and anyway I would rather not take such extreme measures.
There is one other solution: define one global font for diacritics and draw all diacritics with that font. This will cause repeated renderings of 'à' (a`) with different fonts to have a visually different base, but the diacritic is going to look constant. I think this is a reasonable compromise.
What do you think?
|
|
|
|
|
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: Thu May 16 01:27:08 CEST 2024
Total time taken to generate the page: 0.03676 seconds
|