Closed GoogleCodeExporter closed 8 years ago
I don't debug these applications, but seems the problem may be caused that the
words
and glyph runs are issued character by character, and the clipping rectangle is
specified too restrictive.
Original comment by crendk...@gmail.com
on 1 Jun 2010 at 11:41
OK. Any tips on what settings I can use in the .xml for such processes?
P.S - Thanks a lot for gdipp, it is much more easier and appealing to use
windows now,
esp for programming.
Original comment by harshava...@gmail.com
on 2 Jun 2010 at 7:42
I took a look at NetBeans, and found that this is similar to issue 69
(http://code.google.com/p/gdipp/issues/detail?id=66). My guess was right, that
NetBeans calls ExtTextOut character by character. However, after one character
is
ExtTextOut, it will not be ever called again, until the font size is changed.
Obviously Java does font caching internally, probably like the Flyweight pattern
(http://en.wikipedia.org/wiki/Flyweight_pattern, which is suitable for text
editors).
The problem is caused like this, taking Consola 18pt "n" as an example: the cell
ascent is 14 rows. Text origin is (0, -7). ClearType has exactly 7 rows ascent
while
FreeType has 8 rows. Therefore, 1 row above the origin Y-axis, which is
discarded by
NetBeans.
General solution could be hooking GDI's metrics calculating APIs and supply
FreeType's new metrics. However, this may require system-wide caching to
guarantee
acceptable performance, which is rather a long-term plan.
Original comment by crendk...@gmail.com
on 3 Jun 2010 at 5:24
I revisited this issue, and found the source of the problem. Java font manager
uses GetGlyphOutline() to get the actual metrics of each character. Then it
calls ExtTextOut with the glyph origin and bounding box to get glyph bitmap
without internal space, therefore minimize cache size.
To solve the problem, it is required to override GetGlyphOutline and return the
metrics the current gdipp renderer would generate. I think it is possible to
accomplish, however, the introduced compatibility issue is still unknown.
Original comment by crendk...@gmail.com
on 3 Jul 2010 at 4:44
Solved in the development version. We hook GetGlyphOutline, and adjust the
glyph metric. Now NetBeans 6.9 work perfectly.
Original comment by crendk...@gmail.com
on 9 Aug 2010 at 7:12
Attachments:
I found the "workaround" I used to solve this problem conflicts with Google
Picasa. This is because the replacement of GetGlyphOutline() is not complete
yet. Only the glyph metrics is substituted with the FreeType version. Therefore
this issue will remain open until a full GetGlyphOutline() replacement is
completed in some later version.
Original comment by crendk...@gmail.com
on 21 Aug 2010 at 3:49
Thanks for the update and the great work.
Could you tell me know to exclude the netbeans.exe process from gdipp? I put in
<process name="netbeans.exe">
<renderer>0</renderer>
</process>
so that it does not use gdipp, but that does not have any effect at all on
netbeans. If I change netbeans.exe to notepad.exe, I can clearly see the
default rendering taking place in the windows notepad editor pane, so I atleast
know that the .xml is correct.
Thanks.
Original comment by harshava...@gmail.com
on 27 Aug 2010 at 1:04
To exclude a process, you should put the process executable name in the
<exclude>/<process> nodes, as shown in the documentation and the default
setting file.
You can also do what you show here. I can't reproduce the problem you see.
Every text is rendered by ClearType.
Original comment by crendk...@gmail.com
on 27 Aug 2010 at 2:14
Still cannot exclude netbeans, or even eclipse for that matter, after putting
the process name in exclude/process nodes. Only when i exclude javaw.exe does
netbeans and eclipse get excluded.
System is Win7 x64 enterprise, and in process manager netbeans 6.9 shows up as
"netbeans.exe *32".
Original comment by harshava...@gmail.com
on 30 Aug 2010 at 4:55
My solution is add the following code in your gdimm section:
<process name="idea.*">
<renderer>20</renderer>
</process>
Restart your IntelliJ IDEA (or netbeans or any other Java GUI app) and you see
the perfect effects
Original comment by greenlaw...@gmail.com
on 5 Apr 2012 at 5:25
Original issue reported on code.google.com by
harshava...@gmail.com
on 31 May 2010 at 11:44Attachments: