Hi I noticed that if I force use "Source Code Pro" as standard font for all elements in the image I never have problems with font rendering. In case of "Source Sans Pro" font is just not usable becasue of rendering bugs on mac, windows and linux(?). If "Lucida Sans Pro" is used - no bugs too. Because bug is reproducable on all platform - it's platform independent bug. Because it's reproducable only with one specific font - maybe it's not an athens issue but bug in font itself and if someone could change/update Source Sans Pro to a newly version or to a similar font the problem will be solved? Cheers, Alex |
2015-06-10 12:01 GMT+02:00 Aliaksei Syrel <[hidden email]>:
Did you try to use a new font version ? I don't know exactly how embedded fonts are included. I tried to create the font with a newer version but it did not work ( or at least I could not see any difference).
|
Hi
It looks like I fixed that weird text rendering problem... Just get the latest Athens-Cairo. Cheers, Alex
On Mon, Aug 3, 2015 at 9:32 PM, Nicolai Hess <[hidden email]> wrote:
|
How did you fix it? Am 08.10.2015 17:06 schrieb "Aliaksei Syrel" <[hidden email]>:
|
Do you remember a hack with scaling? (scaleBy: 1.0001@1.0001) It makes letters to have the same height, so no more huge ones with small fonts. But it doesn't fix a bug when letters have wrong width so there is a space between characters. The same effect can be achieved if we set font size manually after setting scaled font before drawing glyphs with cairo. It means that at some point we get wrong calculated glyphs. So if we "fix" scaled font before glyph calculation - the problem would be gone. In the patch I set scaled font, manually apply font size, retrieve "fixed" scaled font and calculate glyphs based on it. Also after investigation I found something interesting. If we clean real font of a logical font the problem gets fixed for some period of time. I assume that FreeTypeFont gets broken after a while and logical font always returns broken real font. Setting realFont to nil forces logical font to create a new working free type font. As soon as new free type font is created cairo produces scaled font and caches it. So actual problem lies deep in FreeTypeFont... I even opened two images: one with broken fonts and one with working. Then I compared in inspector two free type fonts - they are absolutely the same and have identical instance variable in a whole object tree, except of handler pointers to C structure which I can't inspect from pharo... Saving image fixes fonts because of LogicalFont>>shutDown: quitting Cheers, Alex On Thu, Oct 8, 2015 at 5:43 PM, Nicolai Hess <[hidden email]> wrote:
|
Also "broken" and working scaled fonts are the same in inspector Cheers, Alex On Thu, Oct 8, 2015 at 6:05 PM, Aliaksei Syrel <[hidden email]> wrote:
|
In reply to this post by Aliaksei Syrel
No, they are needed. Because glyphs must be calculated (getGlyphs:of:) after(!) setting font size. Otherwise there are huge gaps between characters. Thete is a way to break font: 1) Get new pharo image Do something to fix font. Repeat 4-7. If fix is "fake" fonts will be broken.. On Oct 9, 2015 10:31 PM, "Nicolai Hess" <[hidden email]> wrote:
|
In reply to this post by Aliaksei Syrel
Le 8/10/15 18:05, Aliaksei Syrel a
écrit :
Exactly. If you have code we applied accept it. In the pharo roadmaps on github you have a roadmap for the problems I identify.
|
In reply to this post by Aliaksei Syrel
2015-10-09 22:43 GMT+02:00 Aliaksei Syrel <[hidden email]>:
Ok, I understand. In what situation do you see huge gaps between glyphs? I only know about the problem of wrong sized glyphs.
|
Free forum by Nabble | Edit this page |