summaryrefslogtreecommitdiffstats
path: root/scribus
diff options
context:
space:
mode:
authorjghali <jghali@11d20701-8431-0410-a711-e3c959e3b870>2012-02-25 22:40:58 +0000
committerjghali <jghali@11d20701-8431-0410-a711-e3c959e3b870>2012-02-25 22:40:58 +0000
commit98817dfb8e173f0a810f2ccbc6dd87acd043817c (patch)
treed90d1e8594b59ebd3fd8868132b0115706e29d4f /scribus
parentcfdb32687678aa4bb52c547f9d3eeed668f1cd41 (diff)
downloadscribus-98817dfb8e173f0a810f2ccbc6dd87acd043817c.tar.gz
scribus-98817dfb8e173f0a810f2ccbc6dd87acd043817c.tar.xz
scribus-98817dfb8e173f0a810f2ccbc6dd87acd043817c.zip
#10600: Kerning is wrong with Junicode Regular font
git-svn-id: svn://scribus.net/branches/Version14x/Scribus@17339 11d20701-8431-0410-a711-e3c959e3b870
Diffstat (limited to 'scribus')
-rw-r--r--scribus/fonts/scface_ttf.cpp17
1 files changed, 14 insertions, 3 deletions
diff --git a/scribus/fonts/scface_ttf.cpp b/scribus/fonts/scface_ttf.cpp
index 7e44223..e436d36 100644
--- a/scribus/fonts/scface_ttf.cpp
+++ b/scribus/fonts/scface_ttf.cpp
@@ -374,10 +374,21 @@ KernFeature::ClassDefTable KernFeature::getClass ( bool leftGlyph, quint16 class
quint16 End ( toUint16 ( ClassRangeRecord + ( CRR * 6 ) + 2 ) );
quint16 Class ( toUint16 ( ClassRangeRecord + ( CRR * 6 ) + 4 ) );
- for ( int gl ( Start ); gl <= (int) End; ++gl )
+ if (Start <= End)
{
- excludeList<< (quint16) gl;
- ret[Class] << gl;
+ for ( int gl ( Start ); gl <= (int) End; ++gl )
+ {
+ excludeList<< (quint16) gl;
+ ret[Class] << gl;
+ }
+ }
+ else
+ {
+ for ( int gl ( Start ); gl >= (int) End; --gl )
+ {
+ excludeList<< (quint16) gl;
+ ret[Class] << gl;
+ }
}
}
}