| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) |
| 3 * (C) 2000 Antti Koivisto (koivisto@kde.org) | 3 * (C) 2000 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, 2007, 2010, 2011 Apple Inc. All rights reserved. | 5 * Copyright (C) 2003, 2006, 2007, 2010, 2011 Apple Inc. All rights reserved. |
| 6 * Copyright (C) 2008 Holger Hans Peter Freyther | 6 * Copyright (C) 2008 Holger Hans Peter Freyther |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 int top; | 73 int top; |
| 74 int bottom; | 74 int bottom; |
| 75 bool computeBounds; | 75 bool computeBounds; |
| 76 }; | 76 }; |
| 77 | 77 |
| 78 | 78 |
| 79 class PLATFORM_EXPORT Font { | 79 class PLATFORM_EXPORT Font { |
| 80 public: | 80 public: |
| 81 Font(); | 81 Font(); |
| 82 Font(const FontDescription&, float letterSpacing, float wordSpacing); | 82 Font(const FontDescription&, float letterSpacing, float wordSpacing); |
| 83 // This constructor is only used if the platform wants to start with a nativ
e font. | |
| 84 Font(const FontPlatformData&, bool isPrinting, FontSmoothingMode = AutoSmoot
hing); | |
| 85 ~Font(); | 83 ~Font(); |
| 86 | 84 |
| 87 Font(const Font&); | 85 Font(const Font&); |
| 88 Font& operator=(const Font&); | 86 Font& operator=(const Font&); |
| 89 | 87 |
| 90 bool operator==(const Font& other) const; | 88 bool operator==(const Font& other) const; |
| 91 bool operator!=(const Font& other) const { return !(*this == other); } | 89 bool operator!=(const Font& other) const { return !(*this == other); } |
| 92 | 90 |
| 93 const FontDescription& fontDescription() const { return m_fontDescription; } | 91 const FontDescription& fontDescription() const { return m_fontDescription; } |
| 94 | 92 |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 { | 318 { |
| 321 if (!tabSize) | 319 if (!tabSize) |
| 322 return letterSpacing(); | 320 return letterSpacing(); |
| 323 float tabWidth = tabSize * fontData.spaceWidth() + letterSpacing(); | 321 float tabWidth = tabSize * fontData.spaceWidth() + letterSpacing(); |
| 324 return tabWidth - fmodf(position, tabWidth); | 322 return tabWidth - fmodf(position, tabWidth); |
| 325 } | 323 } |
| 326 | 324 |
| 327 } | 325 } |
| 328 | 326 |
| 329 #endif | 327 #endif |
| OLD | NEW |