+ update 2020: WARNING - support of the decompiler is now VERY LIMITED. There are no active developers. This means we will NOT develop new features and/or fix most of bugs. We left the tracker running in case somebody from community would like to work on it. Sorry for the inconvenience.
State: closed new: Initial state. As long as issue is in this state, the work on the issue has not yet begun. opened: Opened state means developer started working on the issue. Feature/Fix will probably be in the next release. postponed: This means developer is not working on it now, for some reason it cannot be implemented now. Issue may be opened again in the future. upgraded: Issue is in upgraded state when developer made changes to the program and new version was released. closed: This means the user is satisfied with issue results and no more changes are needed. invalid: These issues cannot be solved. ignored: Developer decided to take no action on this issue. returned: Program changes were made but user is not satisfied and returned the issue.
I'm trying to make a small tool to extract Text string. And some problem come out while
I'm dealing with DefineText. Now I know it's related to DefineFont, such as GlyphIndex is
the index of the character in the specified font. However, I cannot calculate
GlyphAdvance. I found some Font have FontAdvance value, so text.GlyphAdvance =
font.FontAdvance * text.TextHeight /20480. But some Font donot have FontAdvance value.
Would you pls tell me how to calculate those who donot have FontAdvance value?
What you want glyph advance for?
You want to modify text?
If you want to add new character to a text,
you need glyphindex and glyphadvance.
If the font "has layout", then it is easy, you take advance value from font advance table
for the glyph.
If the font does not contain advance table, then you can't do anything about this.
Fonts without advanced table are usually generated for static texts when there is no need
to insert new text at runtime.
Only thing you "can" do is to get the font name and in your application get advance value
from that font installed on your machine. This unfortunately depends on installed system
In java, I do it this way:
Font fnt = new Font(fontName, fontStyle, 1024);
glyphAdvance = getDivider() * Math.round(fnt.createGlyphVector((new
JPanel()).getFontMetrics(fnt).getFontRenderContext(), "" +