| Index: Source/platform/fonts/SimpleFontData.cpp
|
| diff --git a/Source/platform/fonts/SimpleFontData.cpp b/Source/platform/fonts/SimpleFontData.cpp
|
| index da13c13985b10d54f2ae08a6f0b9b2a019ead071..849e889a0c0a0e787474f7f0c507c433eaaf4830 100644
|
| --- a/Source/platform/fonts/SimpleFontData.cpp
|
| +++ b/Source/platform/fonts/SimpleFontData.cpp
|
| @@ -160,8 +160,9 @@ const SimpleFontData* SimpleFontData::fontDataForCharacter(UChar32) const
|
|
|
| Glyph SimpleFontData::glyphForCharacter(UChar32 character) const
|
| {
|
| - GlyphPageTreeNode* node = GlyphPageTreeNode::getRootChild(this, character / GlyphPage::size);
|
| - return node->page() ? node->page()->glyphAt(character % GlyphPage::size) : 0;
|
| + // As GlyphPage::size is power of 2 so shifting is valid
|
| + GlyphPageTreeNode* node = GlyphPageTreeNode::getRootChild(this, character >> GlyphPage::sizeBits);
|
| + return node->page() ? node->page()->glyphAt(character & 0xFF) : 0;
|
| }
|
|
|
| bool SimpleFontData::isSegmented() const
|
|
|