OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2006, 2007, 2008, 2009, Google Inc. All rights reserved. | 2 * Copyright (c) 2006, 2007, 2008, 2009, Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 private: | 63 private: |
64 // This function retrieves the Windows font data (HFONT, etc) for the next | 64 // This function retrieves the Windows font data (HFONT, etc) for the next |
65 // WebKit font in the list. If the font data corresponding to font_index_ | 65 // WebKit font in the list. If the font data corresponding to font_index_ |
66 // has been obtained before, returns the values stored in our internal | 66 // has been obtained before, returns the values stored in our internal |
67 // vectors (hfonts_, etc). Otherwise, it gets next SimpleFontData from | 67 // vectors (hfonts_, etc). Otherwise, it gets next SimpleFontData from |
68 // WebKit and adds them to in hfonts_ and friends so that font data can be | 68 // WebKit and adds them to in hfonts_ and friends so that font data can be |
69 // returned quickly next time they're requested. | 69 // returned quickly next time they're requested. |
70 virtual bool nextWinFontData(HFONT&, SCRIPT_CACHE*&, SCRIPT_FONTPROPERTIES*&
, int& ascent, WORD& spaceGlyph); | 70 virtual bool nextWinFontData(HFONT&, SCRIPT_CACHE*&, SCRIPT_FONTPROPERTIES*&
, int& ascent, WORD& spaceGlyph); |
71 virtual void resetFontIndex(); | 71 virtual void resetFontIndex(); |
72 | 72 |
73 // Reference to WebKit::Font that contains all the information about fonts | 73 // Reference to blink::Font that contains all the information about fonts |
74 // we can use to render this input run of text. It is used in | 74 // we can use to render this input run of text. It is used in |
75 // NextWinFontData to retrieve Windows font data for a series of | 75 // NextWinFontData to retrieve Windows font data for a series of |
76 // non-primary fonts. | 76 // non-primary fonts. |
77 // | 77 // |
78 // This pointer can be NULL for no font fallback handling. | 78 // This pointer can be NULL for no font fallback handling. |
79 const Font* m_font; | 79 const Font* m_font; |
80 | 80 |
81 // When we have an 8 bit TestRun, we store the buffer of upconverted charact
ers | 81 // When we have an 8 bit TestRun, we store the buffer of upconverted charact
ers |
82 // in this string. | 82 // in this string. |
83 String m_stringFor8BitRun; | 83 String m_stringFor8BitRun; |
84 | 84 |
85 // It's rare that many fonts are listed in stylesheets. | 85 // It's rare that many fonts are listed in stylesheets. |
86 // Four would be large enough in most cases. | 86 // Four would be large enough in most cases. |
87 const static size_t kNumberOfFonts = 4; | 87 const static size_t kNumberOfFonts = 4; |
88 | 88 |
89 // These vectors are used to store Windows font data for non-primary fonts. | 89 // These vectors are used to store Windows font data for non-primary fonts. |
90 Vector<HFONT, kNumberOfFonts> m_hfonts; | 90 Vector<HFONT, kNumberOfFonts> m_hfonts; |
91 Vector<SCRIPT_CACHE*, kNumberOfFonts> m_scriptCaches; | 91 Vector<SCRIPT_CACHE*, kNumberOfFonts> m_scriptCaches; |
92 Vector<SCRIPT_FONTPROPERTIES*, kNumberOfFonts> m_fontProperties; | 92 Vector<SCRIPT_FONTPROPERTIES*, kNumberOfFonts> m_fontProperties; |
93 Vector<int, kNumberOfFonts> m_ascents; | 93 Vector<int, kNumberOfFonts> m_ascents; |
94 Vector<WORD> m_spaceGlyphs; | 94 Vector<WORD> m_spaceGlyphs; |
95 | 95 |
96 // Index of the fallback font we're currently using for NextWinFontData. | 96 // Index of the fallback font we're currently using for NextWinFontData. |
97 int m_fontIndex; | 97 int m_fontIndex; |
98 }; | 98 }; |
99 | 99 |
100 } // namespace WebCore | 100 } // namespace WebCore |
101 | 101 |
102 #endif // UniscribeHelperTextRun_h | 102 #endif // UniscribeHelperTextRun_h |
OLD | NEW |