diff options
Diffstat (limited to 'WebCore/platform/graphics/GlyphBuffer.h')
-rw-r--r-- | WebCore/platform/graphics/GlyphBuffer.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/WebCore/platform/graphics/GlyphBuffer.h b/WebCore/platform/graphics/GlyphBuffer.h index dcda419..04491a7 100644 --- a/WebCore/platform/graphics/GlyphBuffer.h +++ b/WebCore/platform/graphics/GlyphBuffer.h @@ -1,5 +1,6 @@ /* * Copyright (C) 2006, 2009 Apple Inc. All rights reserved. + * Copyright (C) 2007-2008 Torch Mobile Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -49,6 +50,8 @@ class SimpleFontData; #if PLATFORM(CAIRO) // FIXME: Why does Cairo use such a huge struct instead of just an offset into an array? typedef cairo_glyph_t GlyphBufferGlyph; +#elif PLATFORM(WINCE) +typedef wchar_t GlyphBufferGlyph; #else typedef Glyph GlyphBufferGlyph; #endif @@ -57,6 +60,10 @@ typedef Glyph GlyphBufferGlyph; // can be passed directly to CGContextShowGlyphsWithAdvances in FontMac.mm #if PLATFORM(CG) typedef CGSize GlyphBufferAdvance; +#elif PLATFORM(WINCE) +// There is no cross-platform code that uses the height of GlyphBufferAdvance, +// so we can save memory space on embedded devices by storing only the width +typedef float GlyphBufferAdvance; #else typedef FloatSize GlyphBufferAdvance; #endif @@ -117,6 +124,8 @@ public: { #if PLATFORM(CG) return m_advances[index].width; +#elif PLATFORM(WINCE) + return m_advances[index]; #else return m_advances[index].width(); #endif @@ -147,6 +156,8 @@ public: #if PLATFORM(CG) CGSize advance = { width, 0 }; m_advances.append(advance); +#elif PLATFORM(WINCE) + m_advances.append(width); #else m_advances.append(FloatSize(width, 0)); #endif @@ -161,6 +172,7 @@ public: #endif } +#if !PLATFORM(WINCE) void add(Glyph glyph, const SimpleFontData* font, GlyphBufferAdvance advance) { m_fontData.append(font); @@ -174,6 +186,7 @@ public: m_advances.append(advance); } +#endif private: Vector<const SimpleFontData*, 2048> m_fontData; |