diff options
author | Martin Hosken <martin_hosken@sil.org> | 2011-09-22 22:46:33 +0700 |
---|---|---|
committer | Martin Hosken <martin_hosken@sil.org> | 2011-09-22 22:49:07 +0700 |
commit | 162676cb6a940636e958b5787a626d814865ab86 (patch) | |
tree | fd1b3e5b360077e339019a6f230998cffb64e1cf | |
parent | d543cb25e16b1f80d0b2826dc1046ba752199e81 (diff) |
Upgrade graphite to 1.0.3 fix surrogate support
-rw-r--r-- | graphite/graphite2.patch | 4 | ||||
-rw-r--r-- | graphite/graphite_make.patch | 4 | ||||
-rw-r--r-- | graphite/makefile.mk | 7 | ||||
-rw-r--r-- | ooo.lst.in | 2 | ||||
-rw-r--r-- | vcl/source/glyphs/graphite_layout.cxx | 33 |
5 files changed, 27 insertions, 23 deletions
diff --git a/graphite/graphite2.patch b/graphite/graphite2.patch index a13ef0757fb1..d5a956553ad1 100644 --- a/graphite/graphite2.patch +++ b/graphite/graphite2.patch @@ -1,5 +1,5 @@ ---- misc/graphite2-1.0.2/include/graphite2/Types.h 2011-02-12 16:54:16.000000000 +0100 -+++ misc/build/graphite2-1.0.2/include/graphite2/Types.h 2011-03-15 21:38:06.264788098 +0100 +--- misc/graphite2-1.0.3/include/graphite2/Types.h 2011-02-12 16:54:16.000000000 +0100 ++++ misc/build/graphite2-1.0.3/include/graphite2/Types.h 2011-03-15 21:38:06.264788098 +0100 @@ -36,7 +36,8 @@ }; diff --git a/graphite/graphite_make.patch b/graphite/graphite_make.patch index c137c127b05e..4532163be5b0 100644 --- a/graphite/graphite_make.patch +++ b/graphite/graphite_make.patch @@ -1,5 +1,5 @@ ---- misc/build/graphite2-1.0.2/src/makefile.mk Fri Mar 4 10:20:30 2011 +0700 -+++ misc/build/graphite2-1.0.2/src/makefile.mk Fri Mar 4 10:20:30 2011 +0700 +--- misc/build/graphite2-1.0.3/src/makefile.mk Fri Mar 4 10:20:30 2011 +0700 ++++ misc/build/graphite2-1.0.3/src/makefile.mk Fri Mar 4 10:20:30 2011 +0700 @@ -1,1 +1,38 @@ -dummy +EXTERNAL_WARNINGS_NOT_ERRORS := TRUE diff --git a/graphite/makefile.mk b/graphite/makefile.mk index 522c26187daa..3793d6c54778 100644 --- a/graphite/makefile.mk +++ b/graphite/makefile.mk @@ -45,11 +45,10 @@ all: # --- Files -------------------------------------------------------- .IF "$(ENABLE_GRAPHITE)"=="TRUE" -TARFILE_NAME=graphite2-1.0.2 -TARFILE_MD5=3115c721f5cb7c464f01c2dddccfaba6 +TARFILE_NAME=graphite2-1.0.3 +TARFILE_MD5=3bf481ca95109b14435125c0dd1f2217 PATCH_FILES= graphite2.patch \ - graphite_make.patch \ - graphite2.placementnew.patch + graphite_make.patch ADDITIONAL_FILES= \ src/makefile.mk diff --git a/ooo.lst.in b/ooo.lst.in index 63170f60648e..84ea1355f29a 100644 --- a/ooo.lst.in +++ b/ooo.lst.in @@ -87,7 +87,7 @@ d6447e3ae278800c58ae40b740c861c0-libwpd-0.9.3.tar.bz2 0ff7d225d087793c8c2c680d77aac3e7-mdds_0.5.3.tar.bz2 f02578f5218f217a9f20e9c30e119c6a-boost_1_44_0.tar.bz2 3121aaf3e13e5d88dfff13fb4a5f1ab8-hunspell-1.3.2.tar.gz -3115c721f5cb7c464f01c2dddccfaba6-graphite2-1.0.2.tgz +3bf481ca95109b14435125c0dd1f2217-graphite2-1.0.3.tgz cfb4259665fa96874deaa1b233d0b9c2-libvisio-0.0.7.tar.bz2 881af2b7dca9b8259abbca00bbbc004d-LinLibertineG-20110101.zip @GOOGLE_DOCS_EXTENSION_PACK@ diff --git a/vcl/source/glyphs/graphite_layout.cxx b/vcl/source/glyphs/graphite_layout.cxx index 46de93aaac39..a0f48c8ee71a 100644 --- a/vcl/source/glyphs/graphite_layout.cxx +++ b/vcl/source/glyphs/graphite_layout.cxx @@ -36,9 +36,9 @@ #define GR_NAMESPACE // Enable lots of debug info -#ifdef DEBUG +#if OSL_DEBUG_LEVEL > 1 #include <cstdio> -//#define GRLAYOUT_DEBUG 1 +#define GRLAYOUT_DEBUG 1 #undef NDEBUG #endif @@ -329,8 +329,9 @@ GraphiteLayout::fillFrom(gr_segment * pSegment, ImplLayoutArgs &rArgs, float fSc float leftBoundary = gr_slot_origin_X(clusterFirst); float rightBoundary = (clusterAfter)? gr_slot_origin_X(clusterAfter) : gr_seg_advance_X(pSegment); - if (mnSegCharOffset + nFirstCharInCluster >= mnMinCharPos && - mnSegCharOffset + nFirstCharInCluster < mnEndCharPos) + size_t bFirstChar = gr_cinfo_base(gr_seg_cinfo(pSegment, nFirstCharInCluster)); + if (mnSegCharOffset + bFirstChar >= mnMinCharPos && + mnSegCharOffset + bFirstChar < mnEndCharPos) { fMinX = minimum<float>(fMinX, leftBoundary); fMaxX = maximum<float>(fMaxX, rightBoundary); @@ -338,21 +339,22 @@ GraphiteLayout::fillFrom(gr_segment * pSegment, ImplLayoutArgs &rArgs, float fSc { for (int i = nFirstCharInCluster; i <= nLastCharInCluster; i++) { - if (mnSegCharOffset + i >= mnEndCharPos) + size_t ibase = gr_cinfo_base(gr_seg_cinfo(pSegment, i)); + if (mnSegCharOffset + ibase >= mnEndCharPos) break; // from the point of view of the dx array, the xpos is // the origin of the first glyph of the next cluster ltr - mvCharDxs[mnSegCharOffset + i - mnMinCharPos] = + mvCharDxs[mnSegCharOffset + ibase - mnMinCharPos] = static_cast<int>(rightBoundary * fScaling) + nDxOffset; - mvCharBreaks[mnSegCharOffset + i - mnMinCharPos] = gr_cinfo_break_weight(gr_seg_cinfo(pSegment, i)); + mvCharBreaks[mnSegCharOffset + ibase - mnMinCharPos] = gr_cinfo_break_weight(gr_seg_cinfo(pSegment, i)); } // only set mvChar2BaseGlyph for first character of cluster - mvChar2BaseGlyph[mnSegCharOffset + nFirstCharInCluster - mnMinCharPos] = nBaseGlyphIndex; + mvChar2BaseGlyph[mnSegCharOffset + bFirstChar - mnMinCharPos] = nBaseGlyphIndex; } append(pSegment, rArgs, baseSlot, rightBoundary, fScaling, nDxOffset, true, mnSegCharOffset + firstChar); } - if (mnSegCharOffset + nFirstCharInCluster >= mnEndCharPos) + if (mnSegCharOffset + bFirstChar >= mnEndCharPos) break; baseSlot = gr_slot_next_sibling_attachment(baseSlot); } @@ -596,20 +598,23 @@ gr_segment * GraphiteLayout::CreateSegment(ImplLayoutArgs& rArgs) nSegCharLimit - rArgs.mnEndCharPos, bRtl); } } - + size_t numchars = gr_count_unicode_characters(gr_utf16, rArgs.mpStr + mnSegCharOffset, rArgs.mpStr + limit, NULL); if (mpFeatures) pSegment = gr_make_seg(mpFont, mpFace, 0, mpFeatures->values(), gr_utf16, - rArgs.mpStr + mnSegCharOffset, limit - mnSegCharOffset, bRtl); + rArgs.mpStr + mnSegCharOffset, numchars, bRtl); else pSegment = gr_make_seg(mpFont, mpFace, 0, NULL, gr_utf16, - rArgs.mpStr + mnSegCharOffset, limit - mnSegCharOffset, bRtl); + rArgs.mpStr + mnSegCharOffset, numchars, bRtl); //pSegment = new gr::RangeSegment((gr::Font *)&mrFont, mpTextSrc, &maLayout, mnMinCharPos, limit); if (pSegment != NULL) { #ifdef GRLAYOUT_DEBUG - fprintf(grLog(),"Gr::LayoutText %d-%d, context %d,len%d rtl%d scaling %f\n", rArgs.mnMinCharPos, - rArgs.mnEndCharPos, limit, rArgs.mnLength, bRtl, mfScaling); + fprintf(grLog(),"Gr::LayoutText %d-%d, context %d,len%d,numchars%d, rtl%d scaling %f:", rArgs.mnMinCharPos, + rArgs.mnEndCharPos, limit, rArgs.mnLength, numchars, bRtl, mfScaling); + for (int i = mnSegCharOffset; i < limit; ++i) + fprintf(grLog(), " %04X", rArgs.mpStr[i]); + fprintf(grLog(), "\n"); #endif } else |