Bug 380484. Work around ATSUI's 32k pixel limitation; when creating textruns, split the textrun up into smaller pieces if necessary before we pass it to ATSUI. r=vlad
authorroc+@cs.cmu.edu
Mon, 14 May 2007 20:06:52 -0700
changeset 1433 f37d4ab00a01cab05cf12ffb219edf88c246c3a6
parent 1432 0c5b09051910dae8617c822daafd637f748acf42
child 1434 f8dceeccb5cf5c160578ab31e9d879b21f2aa664
push id1
push usersledru@mozilla.com
push dateThu, 04 Dec 2014 17:57:20 +0000
reviewersvlad
bugs380484
milestone1.9a5pre
Bug 380484. Work around ATSUI's 32k pixel limitation; when creating textruns, split the textrun up into smaller pieces if necessary before we pass it to ATSUI. r=vlad
gfx/thebes/public/gfxFont.h
--- a/gfx/thebes/public/gfxFont.h
+++ b/gfx/thebes/public/gfxFont.h
@@ -784,16 +784,18 @@ public:
     PRUint32 GetFlags() const { return mFlags; }
     const gfxSkipChars& GetSkipChars() const { return mSkipChars; }
     PRUint32 GetAppUnitsPerDevUnit() const { return mAppUnitsPerDevUnit; }
     gfxFontGroup *GetFontGroup() const { return mFontGroup; }
     const PRUint8 *GetText8Bit() const
     { return (mFlags & gfxTextRunFactory::TEXT_IS_8BIT) ? mText.mSingle : nsnull; }
     const PRUnichar *GetTextUnicode() const
     { return (mFlags & gfxTextRunFactory::TEXT_IS_8BIT) ? nsnull : mText.mDouble; }
+    const PRUnichar GetChar(PRUint32 i) const
+    { return (mFlags & gfxTextRunFactory::TEXT_IS_8BIT) ? mText.mSingle[i] : mText.mDouble[i]; }
     PRUint32 GetHashCode() const { return mHashCode; }
     void SetHashCode(PRUint32 aHash) { mHashCode = aHash; }
 
     // The caller is responsible for initializing our glyphs after construction.
     // Initially all glyphs are such that GetCharacterGlyphs()[i].IsMissing() is true.
     // We take ownership of aText, which must have been allocated by new[] (it
     // may be null if aLength is zero).
     gfxTextRun(const gfxTextRunFactory::Parameters *aParams, const void *aText,