OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
5 * Copyright (C) 2003, 2006, 2010, 2011 Apple Inc. All rights reserved. | 5 * Copyright (C) 2003, 2006, 2010, 2011 Apple Inc. All rights reserved. |
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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 | 86 |
87 Font::Font(const FontDescription& fd, float letterSpacing, float wordSpacing) | 87 Font::Font(const FontDescription& fd, float letterSpacing, float wordSpacing) |
88 : m_fontDescription(fd) | 88 : m_fontDescription(fd) |
89 , m_letterSpacing(letterSpacing) | 89 , m_letterSpacing(letterSpacing) |
90 , m_wordSpacing(wordSpacing) | 90 , m_wordSpacing(wordSpacing) |
91 , m_isPlatformFont(false) | 91 , m_isPlatformFont(false) |
92 , m_typesettingFeatures(computeTypesettingFeatures()) | 92 , m_typesettingFeatures(computeTypesettingFeatures()) |
93 { | 93 { |
94 } | 94 } |
95 | 95 |
96 Font::Font(const FontPlatformData& fontData, bool isPrinterFont, FontSmoothingMo
de fontSmoothingMode) | |
97 : m_fontFallbackList(FontFallbackList::create()) | |
98 , m_letterSpacing(0) | |
99 , m_wordSpacing(0) | |
100 , m_isPlatformFont(true) | |
101 , m_typesettingFeatures(computeTypesettingFeatures()) | |
102 { | |
103 m_fontDescription.setUsePrinterFont(isPrinterFont); | |
104 m_fontDescription.setFontSmoothing(fontSmoothingMode); | |
105 m_fontFallbackList->setPlatformFont(fontData); | |
106 } | |
107 | |
108 Font::Font(const Font& other) | 96 Font::Font(const Font& other) |
109 : m_fontDescription(other.m_fontDescription) | 97 : m_fontDescription(other.m_fontDescription) |
110 , m_fontFallbackList(other.m_fontFallbackList) | 98 , m_fontFallbackList(other.m_fontFallbackList) |
111 , m_letterSpacing(other.m_letterSpacing) | 99 , m_letterSpacing(other.m_letterSpacing) |
112 , m_wordSpacing(other.m_wordSpacing) | 100 , m_wordSpacing(other.m_wordSpacing) |
113 , m_isPlatformFont(other.m_isPlatformFont) | 101 , m_isPlatformFont(other.m_isPlatformFont) |
114 , m_typesettingFeatures(computeTypesettingFeatures()) | 102 , m_typesettingFeatures(computeTypesettingFeatures()) |
115 { | 103 { |
116 } | 104 } |
117 | 105 |
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
629 } | 617 } |
630 | 618 |
631 void Font::willUseFontData() const | 619 void Font::willUseFontData() const |
632 { | 620 { |
633 const FontFamily& family = fontDescription().family(); | 621 const FontFamily& family = fontDescription().family(); |
634 if (m_fontFallbackList && m_fontFallbackList->fontSelector() && !family.fami
lyIsEmpty()) | 622 if (m_fontFallbackList && m_fontFallbackList->fontSelector() && !family.fami
lyIsEmpty()) |
635 m_fontFallbackList->fontSelector()->willUseFontData(fontDescription(), f
amily.family()); | 623 m_fontFallbackList->fontSelector()->willUseFontData(fontDescription(), f
amily.family()); |
636 } | 624 } |
637 | 625 |
638 } | 626 } |
OLD | NEW |