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

Side by Side Diff: third_party/WebKit/Source/platform/fonts/linux/FontPlatformDataLinux.cpp

Issue 2581083003: Initial OpenType Font Variations Support (Closed)
Patch Set: Fix hash collision tests, adjust test expectations Created 3 years, 12 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) 2006, 2007, 2008, Google Inc. All rights reserved. 2 * Copyright (c) 2006, 2007, 2008, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 27 matching lines...) Expand all
38 void FontPlatformData::setupPaint(SkPaint* paint, 38 void FontPlatformData::setupPaint(SkPaint* paint,
39 float deviceScaleFactor, 39 float deviceScaleFactor,
40 const Font*) const { 40 const Font*) const {
41 m_style.applyToPaint(*paint, deviceScaleFactor); 41 m_style.applyToPaint(*paint, deviceScaleFactor);
42 42
43 const float ts = m_textSize >= 0 ? m_textSize : 12; 43 const float ts = m_textSize >= 0 ? m_textSize : 12;
44 paint->setTextSize(SkFloatToScalar(ts)); 44 paint->setTextSize(SkFloatToScalar(ts));
45 paint->setTypeface(m_typeface); 45 paint->setTypeface(m_typeface);
46 paint->setFakeBoldText(m_syntheticBold); 46 paint->setFakeBoldText(m_syntheticBold);
47 paint->setTextSkewX(m_syntheticItalic ? -SK_Scalar1 / 4 : 0); 47 paint->setTextSkewX(m_syntheticItalic ? -SK_Scalar1 / 4 : 0);
48
49 // TODO(drott): Due to Skia bug 5917
50 // https://bugs.chromium.org/p/skia/issues/detail?id=5917 correct advance
51 // width scaling with FreeType for font sizes under 257px currently only works
52 // with:
53 // paint->setHinting(SkPaint::kNo_Hinting);
48 } 54 }
49 55
50 } // namespace blink 56 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698