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:
File diff suppressed because it is too large
Load Diff
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user