|
ssss
|
|
Reply #16 Posted on: August 09, 2013, 06:01:00 pm |
|
|
Joined: Jun 2013
Posts: 24
|
I think they are generated the same on all systems (or at least platforms). On Windows, for example, everyone should see this:
Enigma plugin asks AWT for a default font in EnigmaWriter.java. I assume logical fonts aren't garanteed to be always the same. Are they? Probably not if msttcorefonts isnt installed on linux. java.awt.Font iF = new java.awt.Font(java.awt.Font.DIALOG,java.awt.Font.PLAIN,12); Also, the default font doesn't look so well and because of size and no AA the lines are not straight when they should be (like in X or Y), so we should at least turn AA on.
It looks like you could get AA easily, the plugin just picks a glyph without AA if available: Object aaHints[] = { RenderingHints.VALUE_TEXT_ANTIALIAS_OFF, RenderingHints.VALUE_TEXT_ANTIALIAS_GASP,RenderingHints.VALUE_TEXT_ANTIALIAS_ON, RenderingHints.VALUE_TEXT_ANTIALIAS_LCD_HRGB }; if (aa < 0 || aa >= aaHints.length) aa = 0; GlyphVector gv = fnt.createGlyphVector(new FontRenderContext(null,aaHints[aa], RenderingHints.VALUE_FRACTIONALMETRICS_OFF),String.valueOf(c));
|
|
|
Logged
|
|
|
|
|
Goombert
|
|
Reply #18 Posted on: August 10, 2013, 05:08:07 am |
|
|
Location: Cappuccino, CA Joined: Jan 2013
Posts: 2993
|
TheExDeus come to think of it, you just made me think about something. How is our font antialiasing rendered? Because in the latest LGM I have font anti aliasing enabled.
|
|
|
Logged
|
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.
|
|
|
Josh @ Dreamland
|
|
Reply #19 Posted on: August 10, 2013, 07:21:13 am |
|
|
Prince of all Goldfish
Location: Pittsburgh, PA, USA Joined: Feb 2008
Posts: 2950
|
Well, I thought about it, Harri, and by my algorithm, the largest amount of empty space between packed glyphs is bounded by the difference in dimension of rectangles packed in a given column or row (which I minimize by sorting up front) multiplied by the largest opposite dimension of textures in the next row or column (counter-respectively). In practice, you'll never have room for more than a 2*16 rectangle, anywhere, and that's if the sorting algorithm can do basically nothing to help the situation.
The best thing we could do to optimize space is flip the — texture by 90°.
|
|
|
Logged
|
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble "I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
|
|
|
|
Goombert
|
|
Reply #21 Posted on: August 13, 2013, 05:24:20 pm |
|
|
Location: Cappuccino, CA Joined: Jan 2013
Posts: 2993
|
Hey hey hey you guys, you'll never guess what I discovered. While I was sitting here writing up GMX loading for LGM, I discovered the new GMX format actually stores a .png of each font resource, it looks like the equivalent of drawing a floor/wall with font_get_texture in ENIGMA, just all the characters organized alphabetically on a transparent background. Or just like that font texture a few posts up from mine. Except theirs is white and not black like ours.
|
|
|
Logged
|
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.
|
|
|
|
Josh @ Dreamland
|
|
Reply #23 Posted on: August 14, 2013, 08:25:16 am |
|
|
Prince of all Goldfish
Location: Pittsburgh, PA, USA Joined: Feb 2008
Posts: 2950
|
/facepalm
|
|
|
Logged
|
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble "I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
|
|
|
|
|
|