Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(122)

Side by Side Diff: Source/platform/fonts/SimpleFontData.h

Issue 870523003: Check for Unicode in Font before ICU call (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Test patch - Convert to NFC for if diacritical marks are present Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * This file is part of the internal font implementation. 2 * This file is part of the internal font implementation.
3 * 3 *
4 * Copyright (C) 2006, 2008, 2010 Apple Inc. All rights reserved. 4 * Copyright (C) 2006, 2008, 2010 Apple Inc. All rights reserved.
5 * Copyright (C) 2007-2008 Torch Mobile, Inc. 5 * Copyright (C) 2007-2008 Torch Mobile, Inc.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 virtual bool shouldSkipDrawing() const override { return m_customFontData && m_customFontData->shouldSkipDrawing(); } 130 virtual bool shouldSkipDrawing() const override { return m_customFontData && m_customFontData->shouldSkipDrawing(); }
131 131
132 const GlyphData& missingGlyphData() const { return m_missingGlyphData; } 132 const GlyphData& missingGlyphData() const { return m_missingGlyphData; }
133 void setMissingGlyphData(const GlyphData& glyphData) { m_missingGlyphData = glyphData; } 133 void setMissingGlyphData(const GlyphData& glyphData) { m_missingGlyphData = glyphData; }
134 134
135 #if OS(MACOSX) 135 #if OS(MACOSX)
136 NSFont* getNSFont() const { return m_platformData.font(); } 136 NSFont* getNSFont() const { return m_platformData.font(); }
137 #endif 137 #endif
138 138
139 bool canRenderCombiningCharacterSequence(const UChar*, size_t) const; 139 bool canRenderCombiningCharacterSequence(const UChar*, size_t) const;
140 bool fontHasGlyphForCharacter(UChar32 character) const;
140 141
141 PassRefPtr<CustomFontData> customFontData() const { return m_customFontData; } 142 PassRefPtr<CustomFontData> customFontData() const { return m_customFontData; }
142 143
143 // Implemented by the platform. 144 // Implemented by the platform.
144 virtual bool fillGlyphPage(GlyphPage* pageToFill, unsigned offset, unsigned length, UChar* buffer, unsigned bufferLength) const; 145 virtual bool fillGlyphPage(GlyphPage* pageToFill, unsigned offset, unsigned length, UChar* buffer, unsigned bufferLength) const;
145 146
146 protected: 147 protected:
147 SimpleFontData(const FontPlatformData&, PassRefPtr<CustomFontData> customDat a, bool isTextOrientationFallback = false); 148 SimpleFontData(const FontPlatformData&, PassRefPtr<CustomFontData> customDat a, bool isTextOrientationFallback = false);
148 149
149 SimpleFontData(PassRefPtr<CustomFontData> customData, float fontSize, bool s yntheticBold, bool syntheticItalic); 150 SimpleFontData(PassRefPtr<CustomFontData> customData, float fontSize, bool s yntheticBold, bool syntheticItalic);
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 width = platformWidthForGlyph(glyph); 235 width = platformWidthForGlyph(glyph);
235 236
236 m_glyphToWidthMap.setMetricsForGlyph(glyph, width); 237 m_glyphToWidthMap.setMetricsForGlyph(glyph, width);
237 return width; 238 return width;
238 } 239 }
239 240
240 DEFINE_FONT_DATA_TYPE_CASTS(SimpleFontData, false); 241 DEFINE_FONT_DATA_TYPE_CASTS(SimpleFontData, false);
241 242
242 } // namespace blink 243 } // namespace blink
243 #endif // SimpleFontData_h 244 #endif // SimpleFontData_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698