Part of bug #176290. Convert to UCS4 and do per-glyph operations using a two-pass method. Centrally locate all UCS4 to glyph translations so all the various functions can use them.

git-svn-id: svn://10.0.0.236/trunk@139383 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
blizzard%redhat.com
2003-03-13 15:21:00 +00:00
parent f1ec2af5e7
commit 2405aae132
2 changed files with 403 additions and 543 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -50,6 +50,9 @@
class nsFontXft;
typedef void (*GlyphEnumeratorCallback) (FcChar32 aChar, nsFontXft *aFont,
void *aData);
class nsFontMetricsXft : public nsIFontMetricsGTK
{
public:
@@ -204,6 +207,13 @@ public:
static nsresult FamilyExists (nsIDeviceContext *aDevice,
const nsString &aName);
void DrawStringCallback (FcChar32 aChar, nsFontXft *aFont,
void *aData);
void TextDimensionsCallback (FcChar32 aChar, nsFontXft *aFont,
void *aData);
void GetWidthCallback (FcChar32 aChar, nsFontXft *aFont,
void *aData);
private:
// local methods
nsresult RealizeFont (void);
@@ -215,11 +225,15 @@ private:
gint RawGetWidth (const PRUnichar* aString,
PRUint32 aLength);
nsresult SetupMiniFont (void);
nsresult DrawUnknownGlyph (PRUint32 aChar,
nsresult DrawUnknownGlyph (FcChar32 aChar,
nscoord aX,
nscoord aY,
XftColor *aColor,
XftDraw *aDraw);
void EnumerateGlyphs (FcChar32 *aChars,
PRUint32 aLen,
GlyphEnumeratorCallback aCallback,
void *aCallbackData);
void PrepareToDraw (nsRenderingContextGTK *aContext,
nsDrawingSurfaceGTK *aSurface,
XftDraw **aDraw, XftColor &aColor);