Ecere Software
/
sdk
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
359450c
)
ecere/gfx/LFBDisplayDriver: Fixed extent of italic fonts
author
Jerome St-Louis
<jerome@ecere.com>
Sat, 23 May 2015 06:49:37 +0000
(
02:49
-0400)
committer
Jerome St-Louis
<jerome@ecere.com>
Sat, 23 May 2015 06:49:37 +0000
(
02:49
-0400)
ecere/src/gfx/drivers/LFBDisplayDriver.ec
patch
|
blob
|
history
diff --git
a/ecere/src/gfx/drivers/LFBDisplayDriver.ec
b/ecere/src/gfx/drivers/LFBDisplayDriver.ec
index
c1e8762
..
9d7baaa
100644
(file)
--- a/
ecere/src/gfx/drivers/LFBDisplayDriver.ec
+++ b/
ecere/src/gfx/drivers/LFBDisplayDriver.ec
@@
-3454,6
+3454,8
@@
public class LFBDisplayDriver : DisplayDriver
int fontEntryNum = 0;
int glyphScript = 0;
FontEntry curFontEntry;
int fontEntryNum = 0;
int glyphScript = 0;
FontEntry curFontEntry;
+ GlyphInfo * lastGlyph = null;
+ int lastAX = 0;
pack.bitmap.alphaBlend = true;
pack.bitmap.alphaBlend = true;
@@
-3811,10
+3813,20
@@
public class LFBDisplayDriver : DisplayDriver
if(callback)
callback(surface, display, ((*x) >> 6), y + (oy >> 6), glyph, (outline ? outline : pack).bitmap);
*x += ax;
if(callback)
callback(surface, display, ((*x) >> 6), y + (oy >> 6), glyph, (outline ? outline : pack).bitmap);
*x += ax;
+
+ lastGlyph = glyph;
+ lastAX = ax;
}
if(numGlyphs && (rightToLeft ? (glyphIndex < 0) : (glyphIndex == numGlyphs)))
numGlyphs = 0;
}
}
if(numGlyphs && (rightToLeft ? (glyphIndex < 0) : (glyphIndex == numGlyphs)))
numGlyphs = 0;
}
+ if(lastGlyph)
+ {
+ int w = (lastGlyph->w * lastGlyph->left) * (1 << 6);
+ // Fix for advance != width + left (e.g. italic fonts)
+ if(w > lastAX)
+ *x += w - lastAX;
+ }
}
if(surface)
{
}
if(surface)
{