git.ucc.asn.au
/
ipdf
/
code.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e35bf65
)
Slightly better kerning maybe?
author
David Gow
<
[email protected]
>
Mon, 18 Aug 2014 08:59:28 +0000
(16:59 +0800)
committer
David Gow
<
[email protected]
>
Mon, 18 Aug 2014 08:59:28 +0000
(16:59 +0800)
src/document.cpp
patch
|
blob
|
history
diff --git
a/src/document.cpp
b/src/document.cpp
index
24746dc
..
57b8925
100644
(file)
--- a/
src/document.cpp
+++ b/
src/document.cpp
@@
-802,7
+802,8
@@
void Document::AddText(const string & text, Real scale, Real x, Real y)
{
kerning = stbtt_GetCodepointKernAdvance(&m_font, text[i-1], text[i]);
}
- x += Real(font_scale) * Real(left_side_bearing + kerning);
+ Debug("%c: lsb %d, kern %d, adv_width %d", text[i], left_side_bearing, kerning, advance_width);
+ x += Real(font_scale) * Real(kerning);
AddFontGlyphAtPoint(&m_font, text[i], font_scale, x, y);
x += Real(font_scale) * Real(advance_width);
}
UCC
git Repository :: git.ucc.asn.au