| OLD | NEW |
| 1 // Copyright (c) 2008, Google Inc. All rights reserved. | 1 // Copyright (c) 2008, Google Inc. All rights reserved. |
| 2 // | 2 // |
| 3 // Redistribution and use in source and binary forms, with or without | 3 // Redistribution and use in source and binary forms, with or without |
| 4 // modification, are permitted provided that the following conditions are | 4 // modification, are permitted provided that the following conditions are |
| 5 // met: | 5 // met: |
| 6 // | 6 // |
| 7 // * Redistributions of source code must retain the above copyright | 7 // * Redistributions of source code must retain the above copyright |
| 8 // notice, this list of conditions and the following disclaimer. | 8 // notice, this list of conditions and the following disclaimer. |
| 9 // * Redistributions in binary form must reproduce the above | 9 // * Redistributions in binary form must reproduce the above |
| 10 // copyright notice, this list of conditions and the following disclaimer | 10 // copyright notice, this list of conditions and the following disclaimer |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 GlyphPage* page, | 197 GlyphPage* page, |
| 198 const SimpleFontData* fontData) | 198 const SimpleFontData* fontData) |
| 199 { | 199 { |
| 200 bool haveGlyphs = false; | 200 bool haveGlyphs = false; |
| 201 | 201 |
| 202 UniscribeHelperTextRun state(buffer, length * 2, false, | 202 UniscribeHelperTextRun state(buffer, length * 2, false, |
| 203 fontData->m_font.hfont(), | 203 fontData->m_font.hfont(), |
| 204 fontData->m_font.scriptCache(), | 204 fontData->m_font.scriptCache(), |
| 205 fontData->m_font.scriptFontProperties()); | 205 fontData->m_font.scriptFontProperties()); |
| 206 state.setInhibitLigate(true); | 206 state.setInhibitLigate(true); |
| 207 state.setDisableFontFallback(true); |
| 207 state.Init(); | 208 state.Init(); |
| 208 | 209 |
| 209 for (unsigned i = 0; i < length; i++) { | 210 for (unsigned i = 0; i < length; i++) { |
| 210 // Each character in this input buffer is a surrogate pair, which | 211 // Each character in this input buffer is a surrogate pair, which |
| 211 // consists of two UChars. So, the offset for its i-th character is | 212 // consists of two UChars. So, the offset for its i-th character is |
| 212 // (i * 2). | 213 // (i * 2). |
| 213 WORD glyph = state.FirstGlyphForCharacter(i * 2); | 214 WORD glyph = state.FirstGlyphForCharacter(i * 2); |
| 214 if (glyph) { | 215 if (glyph) { |
| 215 haveGlyphs = true; | 216 haveGlyphs = true; |
| 216 page->setGlyphDataForIndex(offset + i, glyph, fontData); | 217 page->setGlyphDataForIndex(offset + i, glyph, fontData); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 240 // because each character in the non-BMP input buffer will be | 241 // because each character in the non-BMP input buffer will be |
| 241 // represented by a surrogate pair (two UChar's). | 242 // represented by a surrogate pair (two UChar's). |
| 242 return fillNonBMPGlyphs(offset, length, characterBuffer, | 243 return fillNonBMPGlyphs(offset, length, characterBuffer, |
| 243 this, fontData); | 244 this, fontData); |
| 244 } | 245 } |
| 245 ASSERT_NOT_REACHED(); | 246 ASSERT_NOT_REACHED(); |
| 246 return false; | 247 return false; |
| 247 } | 248 } |
| 248 | 249 |
| 249 } // namespace WebCore | 250 } // namespace WebCore |
| OLD | NEW |