OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006 Oliver Hunt <ojh16@student.canterbury.ac.nz> | 2 * Copyright (C) 2006 Oliver Hunt <ojh16@student.canterbury.ac.nz> |
3 * Copyright (C) 2006 Apple Computer Inc. | 3 * Copyright (C) 2006 Apple Computer Inc. |
4 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> | 4 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> |
5 * Copyright (C) 2008 Rob Buis <buis@kde.org> | 5 * Copyright (C) 2008 Rob Buis <buis@kde.org> |
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
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 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 ASSERT(renderer); | 218 ASSERT(renderer); |
219 | 219 |
220 // Alter font-size to the right on-screen value to avoid scaling the glyphs
themselves, except when GeometricPrecision is specified. | 220 // Alter font-size to the right on-screen value to avoid scaling the glyphs
themselves, except when GeometricPrecision is specified. |
221 scalingFactor = SVGRenderingContext::calculateScreenFontSizeScalingFactor(re
nderer); | 221 scalingFactor = SVGRenderingContext::calculateScreenFontSizeScalingFactor(re
nderer); |
222 if (scalingFactor == 1 || !scalingFactor) { | 222 if (scalingFactor == 1 || !scalingFactor) { |
223 scalingFactor = 1; | 223 scalingFactor = 1; |
224 scaledFont = style->font(); | 224 scaledFont = style->font(); |
225 return; | 225 return; |
226 } | 226 } |
227 | 227 |
228 if (style->fontDescription().textRenderingMode() == GeometricPrecision) | 228 if (style->fontDescription().textRendering() == GeometricPrecision) |
229 scalingFactor = 1; | 229 scalingFactor = 1; |
230 | 230 |
231 FontDescription fontDescription(style->fontDescription()); | 231 FontDescription fontDescription(style->fontDescription()); |
232 | 232 |
233 Document& document = renderer->document(); | 233 Document& document = renderer->document(); |
234 // FIXME: We need to better handle the case when we compute very small fonts
below (below 1pt). | 234 // FIXME: We need to better handle the case when we compute very small fonts
below (below 1pt). |
235 fontDescription.setComputedSize(FontSize::getComputedSizeFromSpecifiedSize(&
document, scalingFactor, fontDescription.isAbsoluteSize(), fontDescription.speci
fiedSize(), DoNotUseSmartMinimumForFontSize)); | 235 fontDescription.setComputedSize(FontSize::getComputedSizeFromSpecifiedSize(&
document, scalingFactor, fontDescription.isAbsoluteSize(), fontDescription.speci
fiedSize(), DoNotUseSmartMinimumForFontSize)); |
236 | 236 |
237 scaledFont = Font(fontDescription); | 237 scaledFont = Font(fontDescription); |
238 scaledFont.update(document.styleEngine()->fontSelector()); | 238 scaledFont.update(document.styleEngine()->fontSelector()); |
239 } | 239 } |
240 | 240 |
241 } | 241 } |
OLD | NEW |