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

Side by Side Diff: third_party/WebKit/WebCore/platform/graphics/chromium/UniscribeHelper.h

Issue 17624: Add m_isGlyphLookupMode to UniscribeHelper class and set it to true when fill... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 11 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2008, Google Inc. All rights reserved. 1 // Copyright (c) 2006-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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 void setWordSpacing(int wordSpacing) 136 void setWordSpacing(int wordSpacing)
137 { 137 {
138 m_wordSpacing = wordSpacing; 138 m_wordSpacing = wordSpacing;
139 } 139 }
140 140
141 void setAscent(int ascent) 141 void setAscent(int ascent)
142 { 142 {
143 m_ascent = ascent; 143 m_ascent = ascent;
144 } 144 }
145 145
146 // When set to true, this class is used only to look up glyph
147 // indices for a range of Unicode characters without glyph placement.
148 // By default, it's false. This should be set to true when this
149 // class is used for glyph index look-up for non-BMP characters
150 // in GlyphPageNodeChromiumWin.cpp.
151 void setDisableFontFallback(bool disableFontFallback)
152 {
153 m_disableFontFallback = true;
154 }
155
146 // You must call this after setting any options but before doing any 156 // You must call this after setting any options but before doing any
147 // other calls like asking for widths or drawing. 157 // other calls like asking for widths or drawing.
148 void Init() 158 void Init()
149 { 159 {
150 InitWithOptionalLengthProtection(true); 160 InitWithOptionalLengthProtection(true);
151 } 161 }
152 162
153 // Returns the total width in pixels of the text run. 163 // Returns the total width in pixels of the text run.
154 int Width() const; 164 int Width() const;
155 165
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 int m_ascent; 385 int m_ascent;
376 LOGFONT m_logfont; 386 LOGFONT m_logfont;
377 int m_style; 387 int m_style;
378 388
379 // Options, see the getters/setters above. 389 // Options, see the getters/setters above.
380 bool m_directionalOverride; 390 bool m_directionalOverride;
381 bool m_inhibitLigate; 391 bool m_inhibitLigate;
382 int m_letterSpacing; 392 int m_letterSpacing;
383 int m_spaceWidth; 393 int m_spaceWidth;
384 int m_wordSpacing; 394 int m_wordSpacing;
395 bool m_disableFontFallback;
385 396
386 // Uniscribe breaks the text into Runs. These are one length of text that is 397 // Uniscribe breaks the text into Runs. These are one length of text that is
387 // in one script and one direction. This array is in reading order. 398 // in one script and one direction. This array is in reading order.
388 Vector<SCRIPT_ITEM, UNISCRIBE_HELPER_STACK_RUNS> m_runs; 399 Vector<SCRIPT_ITEM, UNISCRIBE_HELPER_STACK_RUNS> m_runs;
389 400
390 Vector<Shaping, UNISCRIBE_HELPER_STACK_RUNS> m_shapes; 401 Vector<Shaping, UNISCRIBE_HELPER_STACK_RUNS> m_shapes;
391 402
392 // This is a mapping between reading order and screen order for the items. 403 // This is a mapping between reading order and screen order for the items.
393 // Uniscribe's items array are in reading order. For right-to-left text, 404 // Uniscribe's items array are in reading order. For right-to-left text,
394 // or mixed (although WebKit's |TextRun| should really be only one 405 // or mixed (although WebKit's |TextRun| should really be only one
395 // direction), this makes it very difficult to compute character offsets 406 // direction), this makes it very difficult to compute character offsets
396 // and positions. This list is in screen order from left to right, and 407 // and positions. This list is in screen order from left to right, and
397 // gives the index into the |m_runs| and |m_shapes| arrays of each 408 // gives the index into the |m_runs| and |m_shapes| arrays of each
398 // subsequent item. 409 // subsequent item.
399 Vector<int, UNISCRIBE_HELPER_STACK_RUNS> m_screenOrder; 410 Vector<int, UNISCRIBE_HELPER_STACK_RUNS> m_screenOrder;
400 }; 411 };
401 412
402 } // namespace WebCore 413 } // namespace WebCore
403 414
404 #endif // UniscribeHelper_h 415 #endif // UniscribeHelper_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698