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

Side by Side Diff: Source/platform/fonts/Font.h

Issue 99103006: Moving GraphicsContext and dependencies from core to platform. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Final patch - fixes Android Created 7 years 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
« no previous file with comments | « Source/platform/fonts/CustomFontData.h ('k') | Source/platform/fonts/Font.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
11 * version 2 of the License, or (at your option) any later version. 11 * version 2 of the License, or (at your option) any later version.
12 * 12 *
13 * This library is distributed in the hope that it will be useful, 13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Library General Public License for more details. 16 * Library General Public License for more details.
17 * 17 *
18 * You should have received a copy of the GNU Library General Public License 18 * You should have received a copy of the GNU Library General Public License
19 * along with this library; see the file COPYING.LIB. If not, write to 19 * along with this library; see the file COPYING.LIB. If not, write to
20 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 20 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 * Boston, MA 02110-1301, USA. 21 * Boston, MA 02110-1301, USA.
22 * 22 *
23 */ 23 */
24 24
25 #ifndef Font_h 25 #ifndef Font_h
26 #define Font_h 26 #define Font_h
27 27
28 #include "core/platform/graphics/FontFallbackList.h" 28 #include "platform/PlatformExport.h"
29 #include "core/platform/graphics/SimpleFontData.h"
30 #include "platform/fonts/FontDescription.h" 29 #include "platform/fonts/FontDescription.h"
30 #include "platform/fonts/FontFallbackList.h"
31 #include "platform/fonts/SimpleFontData.h"
31 #include "platform/fonts/TypesettingFeatures.h" 32 #include "platform/fonts/TypesettingFeatures.h"
32 #include "platform/text/TextDirection.h" 33 #include "platform/text/TextDirection.h"
33 #include "wtf/HashMap.h" 34 #include "wtf/HashMap.h"
34 #include "wtf/HashSet.h" 35 #include "wtf/HashSet.h"
35 #include "wtf/MathExtras.h" 36 #include "wtf/MathExtras.h"
36 #include "wtf/unicode/CharacterNames.h" 37 #include "wtf/unicode/CharacterNames.h"
37 38
38 // "X11/X.h" defines Complex to 0 and conflicts 39 // "X11/X.h" defines Complex to 0 and conflicts
39 // with Complex value in CodePath enum. 40 // with Complex value in CodePath enum.
40 #ifdef Complex 41 #ifdef Complex
(...skipping 27 matching lines...) Expand all
68 } 69 }
69 70
70 int left; 71 int left;
71 int right; 72 int right;
72 int top; 73 int top;
73 int bottom; 74 int bottom;
74 bool computeBounds; 75 bool computeBounds;
75 }; 76 };
76 77
77 78
78 class Font { 79 class PLATFORM_EXPORT Font {
79 public: 80 public:
80 Font(); 81 Font();
81 Font(const FontDescription&, float letterSpacing, float wordSpacing); 82 Font(const FontDescription&, float letterSpacing, float wordSpacing);
82 // This constructor is only used if the platform wants to start with a nativ e font. 83 // This constructor is only used if the platform wants to start with a nativ e font.
83 Font(const FontPlatformData&, bool isPrinting, FontSmoothingMode = AutoSmoot hing); 84 Font(const FontPlatformData&, bool isPrinting, FontSmoothingMode = AutoSmoot hing);
84 ~Font(); 85 ~Font();
85 86
86 Font(const Font&); 87 Font(const Font&);
87 Font& operator=(const Font&); 88 Font& operator=(const Font&);
88 89
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 if (!tabSize) 326 if (!tabSize)
326 return letterSpacing(); 327 return letterSpacing();
327 float tabWidth = tabSize * fontData.spaceWidth() + letterSpacing(); 328 float tabWidth = tabSize * fontData.spaceWidth() + letterSpacing();
328 return tabWidth - fmodf(position, tabWidth); 329 return tabWidth - fmodf(position, tabWidth);
329 } 330 }
330 331
331 } 332 }
332 333
333 namespace WTF { 334 namespace WTF {
334 335
335 template <> struct OwnedPtrDeleter<WebCore::TextLayout> { 336 template <> struct PLATFORM_EXPORT OwnedPtrDeleter<WebCore::TextLayout> {
336 static void deletePtr(WebCore::TextLayout*); 337 static void deletePtr(WebCore::TextLayout*);
337 }; 338 };
338 339
339 } 340 }
340 341
341 #endif 342 #endif
OLDNEW
« no previous file with comments | « Source/platform/fonts/CustomFontData.h ('k') | Source/platform/fonts/Font.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698