|
|
Home » U++ Library support » Draw, Display, Images, Bitmaps, Icons » Strange issue with text in Painter
|
Re: Strange issue with text in Painter [message #50967 is a reply to message #50966] |
Tue, 15 January 2019 10:19   |
Tom1
Messages: 1302 Registered: March 2007
|
Ultimate Contributor |
|
|
Hi,
Removal of thread__ for fc_cache and fi_cache do not help. The issue is still there.
-
As for the testcode, I could not spot any false characters there, but the granularity due to significant zooming ruins part of the larger texts.
BR, Tom
|
|
|
|
|
|
|
|
Re: Strange issue with text in Painter [message #50973 is a reply to message #50971] |
Tue, 15 January 2019 11:43   |
Tom1
Messages: 1302 Registered: March 2007
|
Ultimate Contributor |
|
|
mirek wrote on Tue, 15 January 2019 12:23As to this issue, is it possible that all other texts are using your custom "Sheer" italic?
It actually looks like setting tolerance to 0.3 is not a good idea...
EDIT: tolerance is ok
My custom reverse italic (using sheer to lean back) is using standard upright font and the normal italic is using standard italic served by Painter (as is without custom sheer). The ugly characters appear when the font is bold.
The names of lakes and other water areas (light blue) are using this reverse italic. Smaller place names are in plain italic. Larger place names are in straight-up bold. Municipalities are in even larger straight-up capital non-bold letters.
Best regards,
Tom
|
|
|
|
Re: Strange issue with text in Painter [message #50975 is a reply to message #50972] |
Tue, 15 January 2019 11:45   |
Tom1
Messages: 1302 Registered: March 2007
|
Ultimate Contributor |
|
|
mirek wrote on Tue, 15 January 2019 12:27Is it by any means possible that missing letter are from those 'ugly' texts?
I do not know about the missing letters, but the wrong size / wrong italicizing letters tend to come at same size and italicizing as many of the other texts that already occur on the view.
BR, Tom
|
|
|
|
Re: Strange issue with text in Painter [message #50977 is a reply to message #50976] |
Tue, 15 January 2019 11:54   |
Tom1
Messages: 1302 Registered: March 2007
|
Ultimate Contributor |
|
|
I have 1 h 8'...
Anyway, I need to pull back that 'Bold' from some place names. E.g. 'Paloniemi', which is rendered ugly, is just slightly larger straight up text than the more common place names which are italic... not even bold!
Best regards,
Tom
|
|
|
Re: Strange issue with text in Painter [message #50978 is a reply to message #50977] |
Tue, 15 January 2019 12:27   |
Tom1
Messages: 1302 Registered: March 2007
|
Ultimate Contributor |
|
|
Tom1 wrote on Tue, 15 January 2019 12:54I have 1 h 8'...
Anyway, I need to pull back that 'Bold' from some place names. E.g. 'Paloniemi', which is rendered ugly, is just slightly larger straight up text than the more common place names which are italic... not even bold!
Best regards,
Tom
OK, now I know: There is no separate path for those ugly texts. But I suppose the font size causes some conditional conversion to polygons in Painting. I forced all fonts to be of height 12, and then applied suitable Scale to Painter. As a result all the fonts were (ugly) rendered with precision that was insufficient when zooming in. Then I did this using height 75 and again suitable scale to painter. This time all the texts rendered beautifully in Painting. So I guess the storage format and precision in Painting is dependent on font size.
BR, Tom
EDIT: I changed font height to 1 and tried again: This time all fonts rendered perfectly!! But, the inter-character spacing precision in words was terrible.
EDIT: I think I understand why I cannot send the problem in a painting to you: The Painting is generated ST and characters are partly rendered already, so the error will not show up. I must generate a file with only unrendered characters, which get rendered at your end only.
[Updated on: Tue, 15 January 2019 12:59] Report message to a moderator
|
|
|
Re: Strange issue with text in Painter [message #50979 is a reply to message #50967] |
Tue, 15 January 2019 13:28   |
Tom1
Messages: 1302 Registered: March 2007
|
Ultimate Contributor |
|
|
Tom1 wrote on Tue, 15 January 2019 11:19Hi,
Removal of thread__ for fc_cache and fi_cache do not help. The issue is still there.
-
As for the testcode, I could not spot any false characters there, but the granularity due to significant zooming ruins part of the larger texts.
BR, Tom
Hi!
It looks like this change of removing thread__ for fc_cache and fi_cache did not get compiled for me as I was simultaneously working on the testcode. Now I recompiled all and tried this once more and BANG! The problem was gone from my own program. And I also got it back by adding the thread__ ahead of those two caches. I think this solved the issue!
I must fly now... Will be back for more testing tomorrow.
A million thanks and best regards,
Tom
|
|
|
|
|
Re: Strange issue with text in Painter [message #50982 is a reply to message #50981] |
Tue, 15 January 2019 16:20   |
 |
mirek
Messages: 14256 Registered: November 2005
|
Ultimate Member |
|
|
Upon further investigation we can forget about ugly texts. Most likely these are just results of font hinting process in Win32.
(As to what got me so confused, those texts are so mangled that I misread the name and then failed to find it in the list...)
EDIT: Hinting confirmed. I have added |GGO_UNHINTED to the GetGlyphOutlineW call and problem disappeared... (now in trunk).
[Updated on: Tue, 15 January 2019 16:26] Report message to a moderator
|
|
|
|
Re: Strange issue with text in Painter [message #50984 is a reply to message #50983] |
Wed, 16 January 2019 08:54   |
Tom1
Messages: 1302 Registered: March 2007
|
Ultimate Contributor |
|
|
Good morning Mirek,
Removing "thread__" from "thread__ CharEntry fc_cache[512];" fixes it.
Removing "thread__" from "thread__ FontEntry fi_cache[63];" does not have any effect on the problem.
Best regards,
Tom
BTW: Why should the caches be thread_local anyway? Isn't it true that Painter will use the same fonts with a whole bunch of threads when painting in MT? Having them common for all threads would have the used fonts cached after first hit and available to all threads. (Well, I'm likely missing something important here, but you'll probably educate me on that shortly...)
[Updated on: Wed, 16 January 2019 09:12] Report message to a moderator
|
|
|
|
Goto Forum:
Current Time: Thu May 01 01:07:04 CEST 2025
Total time taken to generate the page: 0.03860 seconds
|
|
|