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

Side by Side Diff: Source/platform/fonts/SimpleFontData.cpp

Issue 617103003: Replace ENABLE_OPENTYPE_VERTICAL implementation with HarfBuzz (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@removeOpenTypeVertical
Patch Set: Additional TestExpectations tweaking for Mac Created 6 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2005, 2008, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2005, 2008, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2006 Alexey Proskuryakov 3 * Copyright (C) 2006 Alexey Proskuryakov
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 static const size_t maxVDMXTableSize = 1024 * 1024; // 1 MB 53 static const size_t maxVDMXTableSize = 1024 * 1024; // 1 MB
54 #endif 54 #endif
55 55
56 SimpleFontData::SimpleFontData(const FontPlatformData& platformData, PassRefPtr< CustomFontData> customData, bool isTextOrientationFallback) 56 SimpleFontData::SimpleFontData(const FontPlatformData& platformData, PassRefPtr< CustomFontData> customData, bool isTextOrientationFallback)
57 : m_maxCharWidth(-1) 57 : m_maxCharWidth(-1)
58 , m_avgCharWidth(-1) 58 , m_avgCharWidth(-1)
59 , m_platformData(platformData) 59 , m_platformData(platformData)
60 , m_treatAsFixedPitch(false) 60 , m_treatAsFixedPitch(false)
61 , m_isTextOrientationFallback(isTextOrientationFallback) 61 , m_isTextOrientationFallback(isTextOrientationFallback)
62 , m_isBrokenIdeographFallback(false) 62 , m_isBrokenIdeographFallback(false)
63 #if ENABLE(OPENTYPE_VERTICAL)
64 , m_verticalData(nullptr) 63 , m_verticalData(nullptr)
65 #endif
66 , m_hasVerticalGlyphs(false) 64 , m_hasVerticalGlyphs(false)
67 , m_customFontData(customData) 65 , m_customFontData(customData)
68 { 66 {
69 platformInit(); 67 platformInit();
70 platformGlyphInit(); 68 platformGlyphInit();
71 #if ENABLE(OPENTYPE_VERTICAL)
72 if (platformData.orientation() == Vertical && !isTextOrientationFallback) { 69 if (platformData.orientation() == Vertical && !isTextOrientationFallback) {
73 m_verticalData = platformData.verticalData(); 70 m_verticalData = platformData.verticalData();
74 m_hasVerticalGlyphs = m_verticalData.get() && m_verticalData->hasVertica lMetrics(); 71 m_hasVerticalGlyphs = m_verticalData.get() && m_verticalData->hasVertica lMetrics();
75 } 72 }
76 #endif
77 } 73 }
78 74
79 SimpleFontData::SimpleFontData(PassRefPtr<CustomFontData> customData, float font Size, bool syntheticBold, bool syntheticItalic) 75 SimpleFontData::SimpleFontData(PassRefPtr<CustomFontData> customData, float font Size, bool syntheticBold, bool syntheticItalic)
80 : m_platformData(FontPlatformData(fontSize, syntheticBold, syntheticItalic)) 76 : m_platformData(FontPlatformData(fontSize, syntheticBold, syntheticItalic))
81 , m_treatAsFixedPitch(false) 77 , m_treatAsFixedPitch(false)
82 , m_isTextOrientationFallback(false) 78 , m_isTextOrientationFallback(false)
83 , m_isBrokenIdeographFallback(false) 79 , m_isBrokenIdeographFallback(false)
84 #if ENABLE(OPENTYPE_VERTICAL)
85 , m_verticalData(nullptr) 80 , m_verticalData(nullptr)
86 #endif
87 , m_hasVerticalGlyphs(false) 81 , m_hasVerticalGlyphs(false)
88 , m_customFontData(customData) 82 , m_customFontData(customData)
89 { 83 {
90 if (m_customFontData) 84 if (m_customFontData)
91 m_customFontData->initializeFontData(this, fontSize); 85 m_customFontData->initializeFontData(this, fontSize);
92 } 86 }
93 87
94 void SimpleFontData::platformInit() 88 void SimpleFontData::platformInit()
95 { 89 {
96 if (!m_platformData.size()) { 90 if (!m_platformData.size()) {
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 if (glyphs[i]) { 478 if (glyphs[i]) {
485 pageToFill->setGlyphDataForIndex(offset + i, glyphs[i], this); 479 pageToFill->setGlyphDataForIndex(offset + i, glyphs[i], this);
486 haveGlyphs = true; 480 haveGlyphs = true;
487 } 481 }
488 } 482 }
489 483
490 return haveGlyphs; 484 return haveGlyphs;
491 } 485 }
492 486
493 } // namespace blink 487 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/fonts/SimpleFontData.h ('k') | Source/platform/fonts/opentype/OpenTypeVerticalData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698