diff options
author | ctguil@chromium.org <ctguil@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-05-16 22:00:05 +0000 |
---|---|---|
committer | ctguil@chromium.org <ctguil@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-05-16 22:00:05 +0000 |
commit | fcaa7dfdeca3101d3ce6e4ec852e790bce1b7b48 (patch) | |
tree | b113a27af0b8bbfb0b83e3b8d5dcc4248809d2b0 | |
parent | b01c01997920a66d46af31e942ecf0ea62aa2b11 (diff) | |
download | src-fcaa7dfdeca3101d3ce6e4ec852e790bce1b7b48.tar.gz |
Use SkSetFourByteTag in SkFontHost_win.cpp.
Review URL: http://codereview.appspot.com/4535075
git-svn-id: http://skia.googlecode.com/svn/trunk/src@1340 2bbb7eff-a529-9590-31e7-b0007b416f81
-rwxr-xr-x | ports/SkFontHost_win.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ports/SkFontHost_win.cpp b/ports/SkFontHost_win.cpp index d9404f39..e274a988 100755 --- a/ports/SkFontHost_win.cpp +++ b/ports/SkFontHost_win.cpp @@ -83,7 +83,8 @@ static inline FIXED SkScalarToFIXED(SkScalar x) { static unsigned calculateGlyphCount(HDC hdc) { // The 'maxp' table stores the number of glyphs at offset 4, in 2 bytes. - const DWORD maxpTag = *(DWORD*) "maxp"; + const DWORD maxpTag = + SkEndian_SwapBE32(SkSetFourByteTag('m', 'a', 'x', 'p')); uint16_t glyphs; if (GetFontData(hdc, maxpTag, 4, &glyphs, sizeof(glyphs)) != GDI_ERROR) { return SkEndian_SwapBE16(glyphs); @@ -790,7 +791,8 @@ SkTypeface* SkFontHost::CreateTypefaceFromStream(SkStream* stream) { } SkStream* SkFontHost::OpenStream(SkFontID uniqueID) { - const DWORD kTTCTag = *(DWORD*) "ttcf"; + const DWORD kTTCTag = + SkEndian_SwapBE32(SkSetFourByteTag('t', 't', 'c', 'f')); LOGFONT lf; GetLogFontByID(uniqueID, &lf); |