Kaydet (Commit) 162676cb authored tarafından Martin Hosken's avatar Martin Hosken

Upgrade graphite to 1.0.3 fix surrogate support

üst d543cb25
--- misc/graphite2-1.0.2/include/graphite2/Types.h 2011-02-12 16:54:16.000000000 +0100 --- misc/graphite2-1.0.3/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/build/graphite2-1.0.3/include/graphite2/Types.h 2011-03-15 21:38:06.264788098 +0100
@@ -36,7 +36,8 @@ @@ -36,7 +36,8 @@
}; };
......
--- 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.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
@@ -1,1 +1,38 @@ @@ -1,1 +1,38 @@
-dummy -dummy
+EXTERNAL_WARNINGS_NOT_ERRORS := TRUE +EXTERNAL_WARNINGS_NOT_ERRORS := TRUE
......
...@@ -45,11 +45,10 @@ all: ...@@ -45,11 +45,10 @@ all:
# --- Files -------------------------------------------------------- # --- Files --------------------------------------------------------
.IF "$(ENABLE_GRAPHITE)"=="TRUE" .IF "$(ENABLE_GRAPHITE)"=="TRUE"
TARFILE_NAME=graphite2-1.0.2 TARFILE_NAME=graphite2-1.0.3
TARFILE_MD5=3115c721f5cb7c464f01c2dddccfaba6 TARFILE_MD5=3bf481ca95109b14435125c0dd1f2217
PATCH_FILES= graphite2.patch \ PATCH_FILES= graphite2.patch \
graphite_make.patch \ graphite_make.patch
graphite2.placementnew.patch
ADDITIONAL_FILES= \ ADDITIONAL_FILES= \
src/makefile.mk src/makefile.mk
......
...@@ -87,7 +87,7 @@ d6447e3ae278800c58ae40b740c861c0-libwpd-0.9.3.tar.bz2 ...@@ -87,7 +87,7 @@ d6447e3ae278800c58ae40b740c861c0-libwpd-0.9.3.tar.bz2
0ff7d225d087793c8c2c680d77aac3e7-mdds_0.5.3.tar.bz2 0ff7d225d087793c8c2c680d77aac3e7-mdds_0.5.3.tar.bz2
f02578f5218f217a9f20e9c30e119c6a-boost_1_44_0.tar.bz2 f02578f5218f217a9f20e9c30e119c6a-boost_1_44_0.tar.bz2
3121aaf3e13e5d88dfff13fb4a5f1ab8-hunspell-1.3.2.tar.gz 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 cfb4259665fa96874deaa1b233d0b9c2-libvisio-0.0.7.tar.bz2
881af2b7dca9b8259abbca00bbbc004d-LinLibertineG-20110101.zip 881af2b7dca9b8259abbca00bbbc004d-LinLibertineG-20110101.zip
@GOOGLE_DOCS_EXTENSION_PACK@ @GOOGLE_DOCS_EXTENSION_PACK@
......
...@@ -36,9 +36,9 @@ ...@@ -36,9 +36,9 @@
#define GR_NAMESPACE #define GR_NAMESPACE
// Enable lots of debug info // Enable lots of debug info
#ifdef DEBUG #if OSL_DEBUG_LEVEL > 1
#include <cstdio> #include <cstdio>
//#define GRLAYOUT_DEBUG 1 #define GRLAYOUT_DEBUG 1
#undef NDEBUG #undef NDEBUG
#endif #endif
...@@ -329,8 +329,9 @@ GraphiteLayout::fillFrom(gr_segment * pSegment, ImplLayoutArgs &rArgs, float fSc ...@@ -329,8 +329,9 @@ GraphiteLayout::fillFrom(gr_segment * pSegment, ImplLayoutArgs &rArgs, float fSc
float leftBoundary = gr_slot_origin_X(clusterFirst); float leftBoundary = gr_slot_origin_X(clusterFirst);
float rightBoundary = (clusterAfter)? float rightBoundary = (clusterAfter)?
gr_slot_origin_X(clusterAfter) : gr_seg_advance_X(pSegment); gr_slot_origin_X(clusterAfter) : gr_seg_advance_X(pSegment);
if (mnSegCharOffset + nFirstCharInCluster >= mnMinCharPos && size_t bFirstChar = gr_cinfo_base(gr_seg_cinfo(pSegment, nFirstCharInCluster));
mnSegCharOffset + nFirstCharInCluster < mnEndCharPos) if (mnSegCharOffset + bFirstChar >= mnMinCharPos &&
mnSegCharOffset + bFirstChar < mnEndCharPos)
{ {
fMinX = minimum<float>(fMinX, leftBoundary); fMinX = minimum<float>(fMinX, leftBoundary);
fMaxX = maximum<float>(fMaxX, rightBoundary); fMaxX = maximum<float>(fMaxX, rightBoundary);
...@@ -338,21 +339,22 @@ GraphiteLayout::fillFrom(gr_segment * pSegment, ImplLayoutArgs &rArgs, float fSc ...@@ -338,21 +339,22 @@ GraphiteLayout::fillFrom(gr_segment * pSegment, ImplLayoutArgs &rArgs, float fSc
{ {
for (int i = nFirstCharInCluster; i <= nLastCharInCluster; i++) 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; break;
// from the point of view of the dx array, the xpos is // from the point of view of the dx array, the xpos is
// the origin of the first glyph of the next cluster ltr // 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; 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 // only set mvChar2BaseGlyph for first character of cluster
mvChar2BaseGlyph[mnSegCharOffset + nFirstCharInCluster - mnMinCharPos] = nBaseGlyphIndex; mvChar2BaseGlyph[mnSegCharOffset + bFirstChar - mnMinCharPos] = nBaseGlyphIndex;
} }
append(pSegment, rArgs, baseSlot, rightBoundary, fScaling, append(pSegment, rArgs, baseSlot, rightBoundary, fScaling,
nDxOffset, true, mnSegCharOffset + firstChar); nDxOffset, true, mnSegCharOffset + firstChar);
} }
if (mnSegCharOffset + nFirstCharInCluster >= mnEndCharPos) if (mnSegCharOffset + bFirstChar >= mnEndCharPos)
break; break;
baseSlot = gr_slot_next_sibling_attachment(baseSlot); baseSlot = gr_slot_next_sibling_attachment(baseSlot);
} }
...@@ -596,20 +598,23 @@ gr_segment * GraphiteLayout::CreateSegment(ImplLayoutArgs& rArgs) ...@@ -596,20 +598,23 @@ gr_segment * GraphiteLayout::CreateSegment(ImplLayoutArgs& rArgs)
nSegCharLimit - rArgs.mnEndCharPos, bRtl); nSegCharLimit - rArgs.mnEndCharPos, bRtl);
} }
} }
size_t numchars = gr_count_unicode_characters(gr_utf16, rArgs.mpStr + mnSegCharOffset, rArgs.mpStr + limit, NULL);
if (mpFeatures) if (mpFeatures)
pSegment = gr_make_seg(mpFont, mpFace, 0, mpFeatures->values(), gr_utf16, pSegment = gr_make_seg(mpFont, mpFace, 0, mpFeatures->values(), gr_utf16,
rArgs.mpStr + mnSegCharOffset, limit - mnSegCharOffset, bRtl); rArgs.mpStr + mnSegCharOffset, numchars, bRtl);
else else
pSegment = gr_make_seg(mpFont, mpFace, 0, NULL, gr_utf16, 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); //pSegment = new gr::RangeSegment((gr::Font *)&mrFont, mpTextSrc, &maLayout, mnMinCharPos, limit);
if (pSegment != NULL) if (pSegment != NULL)
{ {
#ifdef GRLAYOUT_DEBUG #ifdef GRLAYOUT_DEBUG
fprintf(grLog(),"Gr::LayoutText %d-%d, context %d,len%d rtl%d scaling %f\n", rArgs.mnMinCharPos, fprintf(grLog(),"Gr::LayoutText %d-%d, context %d,len%d,numchars%d, rtl%d scaling %f:", rArgs.mnMinCharPos,
rArgs.mnEndCharPos, limit, rArgs.mnLength, bRtl, mfScaling); 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 #endif
} }
else else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment