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:
5456793
)
Fix kerning for the first pair of characters
author
David Gow
<
[email protected]
>
Mon, 18 Aug 2014 13:18:31 +0000
(21:18 +0800)
committer
David Gow
<
[email protected]
>
Mon, 18 Aug 2014 13:18:31 +0000
(21:18 +0800)
src/document.cpp
patch
|
blob
|
history
diff --git
a/src/document.cpp
b/src/document.cpp
index
57b8925
..
3f00e64
100644
(file)
--- a/
src/document.cpp
+++ b/
src/document.cpp
@@
-798,7
+798,7
@@
void Document::AddText(const string & text, Real scale, Real x, Real y)
int advance_width = 0, left_side_bearing = 0, kerning = 0;
stbtt_GetCodepointHMetrics(&m_font, text[i], &advance_width, &left_side_bearing);
- if (i > 1)
+ if (i >
=
1)
{
kerning = stbtt_GetCodepointKernAdvance(&m_font, text[i-1], text[i]);
}
UCC
git Repository :: git.ucc.asn.au