OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2009, Google Inc. All rights reserved. | 2 * Copyright (c) 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 | 52 |
53 public: | 53 public: |
54 FontFaceCreationParams() | 54 FontFaceCreationParams() |
55 : m_creationType(CreateFontByFamily), m_family(AtomicString()), m_filena
me(CString()), m_fontconfigInterfaceId(0), m_ttcIndex(0) | 55 : m_creationType(CreateFontByFamily), m_family(AtomicString()), m_filena
me(CString()), m_fontconfigInterfaceId(0), m_ttcIndex(0) |
56 { | 56 { |
57 } | 57 } |
58 | 58 |
59 explicit FontFaceCreationParams(AtomicString family) | 59 explicit FontFaceCreationParams(AtomicString family) |
60 : m_creationType(CreateFontByFamily), m_family(family), m_filename(CStri
ng()), m_fontconfigInterfaceId(0), m_ttcIndex(0) | 60 : m_creationType(CreateFontByFamily), m_family(family), m_filename(CStri
ng()), m_fontconfigInterfaceId(0), m_ttcIndex(0) |
61 { | 61 { |
62 #if OS(WIN) && ENABLE(OPENTYPE_VERTICAL) | 62 #if OS(WIN) |
63 // Leading "@" in the font name enables Windows vertical flow flag for the f
ont. | 63 // Leading "@" in the font name enables Windows vertical flow flag for the f
ont. |
64 // Because we do vertical flow by ourselves, we don't want to use the Window
s feature. | 64 // Because we do vertical flow by ourselves, we don't want to use the Window
s feature. |
65 // IE disregards "@" regardless of the orientation, so we follow the behavio
r and | 65 // IE disregards "@" regardless of the orientation, so we follow the behavio
r and |
66 // normalize the family name. | 66 // normalize the family name. |
67 m_family = (m_family.isEmpty() || m_family[0] != '@') ? m_family : AtomicStr
ing(m_family.impl()->substring(1)); | 67 m_family = (m_family.isEmpty() || m_family[0] != '@') ? m_family : AtomicStr
ing(m_family.impl()->substring(1)); |
68 #endif | 68 #endif |
69 } | 69 } |
70 | 70 |
71 FontFaceCreationParams(CString filename, int fontconfigInterfaceId, int ttcI
ndex = 0) | 71 FontFaceCreationParams(CString filename, int fontconfigInterfaceId, int ttcI
ndex = 0) |
72 : m_creationType(CreateFontByFciIdAndTtcIndex), m_filename(filename), m_
fontconfigInterfaceId(fontconfigInterfaceId), m_ttcIndex(ttcIndex) | 72 : m_creationType(CreateFontByFciIdAndTtcIndex), m_filename(filename), m_
fontconfigInterfaceId(fontconfigInterfaceId), m_ttcIndex(ttcIndex) |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 && m_filename == other.m_filename | 118 && m_filename == other.m_filename |
119 && m_fontconfigInterfaceId == other.m_fontconfigInterfaceId | 119 && m_fontconfigInterfaceId == other.m_fontconfigInterfaceId |
120 && m_ttcIndex == other.m_ttcIndex; | 120 && m_ttcIndex == other.m_ttcIndex; |
121 } | 121 } |
122 | 122 |
123 }; | 123 }; |
124 | 124 |
125 } // namespace blink | 125 } // namespace blink |
126 | 126 |
127 #endif // FontFaceCreationParams_h | 127 #endif // FontFaceCreationParams_h |
OLD | NEW |