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

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

Issue 444413003: Make style building for font-weight less custom. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 4 months 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
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, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserv ed. 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserv ed.
6 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> 6 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com>
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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 const FontFamily& family() const { return m_familyList; } 106 const FontFamily& family() const { return m_familyList; }
107 FontFamily& firstFamily() { return m_familyList; } 107 FontFamily& firstFamily() { return m_familyList; }
108 float specifiedSize() const { return m_specifiedSize; } 108 float specifiedSize() const { return m_specifiedSize; }
109 float computedSize() const { return m_computedSize; } 109 float computedSize() const { return m_computedSize; }
110 FontStyle style() const { return static_cast<FontStyle>(m_style); } 110 FontStyle style() const { return static_cast<FontStyle>(m_style); }
111 int computedPixelSize() const { return int(m_computedSize + 0.5f); } 111 int computedPixelSize() const { return int(m_computedSize + 0.5f); }
112 FontVariant variant() const { return static_cast<FontVariant>(m_variant); } 112 FontVariant variant() const { return static_cast<FontVariant>(m_variant); }
113 bool isAbsoluteSize() const { return m_isAbsoluteSize; } 113 bool isAbsoluteSize() const { return m_isAbsoluteSize; }
114 FontWeight weight() const { return static_cast<FontWeight>(m_weight); } 114 FontWeight weight() const { return static_cast<FontWeight>(m_weight); }
115 FontStretch stretch() const { return static_cast<FontStretch>(m_stretch); } 115 FontStretch stretch() const { return static_cast<FontStretch>(m_stretch); }
116 FontWeight lighterWeight() const; 116 static FontWeight lighterWeight(FontWeight);
117 FontWeight bolderWeight() const; 117 static FontWeight bolderWeight(FontWeight);
118 GenericFamilyType genericFamily() const { return static_cast<GenericFamilyTy pe>(m_genericFamily); } 118 GenericFamilyType genericFamily() const { return static_cast<GenericFamilyTy pe>(m_genericFamily); }
119 119
120 // only use fixed default size when there is only one font family, and that family is "monospace" 120 // only use fixed default size when there is only one font family, and that family is "monospace"
121 FixedPitchFontType fixedPitchFontType() const 121 FixedPitchFontType fixedPitchFontType() const
122 { 122 {
123 if (genericFamily() == MonospaceFamily && !family().next() && family().f amily() == FontFamilyNames::webkit_monospace) 123 if (genericFamily() == MonospaceFamily && !family().next() && family().f amily() == FontFamilyNames::webkit_monospace)
124 return FixedPitchFont; 124 return FixedPitchFont;
125 return NonFixedPitchFont; 125 return NonFixedPitchFont;
126 } 126 }
127 Kerning kerning() const { return static_cast<Kerning>(m_kerning); } 127 Kerning kerning() const { return static_cast<Kerning>(m_kerning); }
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 && m_script == other.m_script 264 && m_script == other.m_script
265 && m_syntheticBold == other.m_syntheticBold 265 && m_syntheticBold == other.m_syntheticBold
266 && m_syntheticItalic == other.m_syntheticItalic 266 && m_syntheticItalic == other.m_syntheticItalic
267 && m_featureSettings == other.m_featureSettings 267 && m_featureSettings == other.m_featureSettings
268 && m_subpixelTextPosition == other.m_subpixelTextPosition; 268 && m_subpixelTextPosition == other.m_subpixelTextPosition;
269 } 269 }
270 270
271 } 271 }
272 272
273 #endif 273 #endif
OLDNEW
« no previous file with comments | « Source/core/css/resolver/StyleBuilderCustom.cpp ('k') | Source/platform/fonts/FontDescription.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698