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

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

Issue 656913006: Remove SVG fonts (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Update tests for landing Created 6 years, 2 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 | Annotate | Revision Log
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 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 if (brokenIdeograph) 371 if (brokenIdeograph)
372 GlyphPageTreeNode::pruneTreeCustomFontData(brokenIdeograph.get()); 372 GlyphPageTreeNode::pruneTreeCustomFontData(brokenIdeograph.get());
373 if (verticalRightOrientation) 373 if (verticalRightOrientation)
374 GlyphPageTreeNode::pruneTreeCustomFontData(verticalRightOrientation.get( )); 374 GlyphPageTreeNode::pruneTreeCustomFontData(verticalRightOrientation.get( ));
375 if (uprightOrientation) 375 if (uprightOrientation)
376 GlyphPageTreeNode::pruneTreeCustomFontData(uprightOrientation.get()); 376 GlyphPageTreeNode::pruneTreeCustomFontData(uprightOrientation.get());
377 } 377 }
378 378
379 PassRefPtr<SimpleFontData> SimpleFontData::createScaledFontData(const FontDescri ption& fontDescription, float scaleFactor) const 379 PassRefPtr<SimpleFontData> SimpleFontData::createScaledFontData(const FontDescri ption& fontDescription, float scaleFactor) const
380 { 380 {
381 // FIXME: Support scaled SVG fonts. Given that SVG is scalable in general th is should be achievable.
382 if (isSVGFont())
383 return nullptr;
384
385 return platformCreateScaledFontData(fontDescription, scaleFactor); 381 return platformCreateScaledFontData(fontDescription, scaleFactor);
386 } 382 }
387 383
388
389
390 PassRefPtr<SimpleFontData> SimpleFontData::platformCreateScaledFontData(const Fo ntDescription& fontDescription, float scaleFactor) const 384 PassRefPtr<SimpleFontData> SimpleFontData::platformCreateScaledFontData(const Fo ntDescription& fontDescription, float scaleFactor) const
391 { 385 {
392 const float scaledSize = lroundf(fontDescription.computedSize() * scaleFacto r); 386 const float scaledSize = lroundf(fontDescription.computedSize() * scaleFacto r);
393 return SimpleFontData::create(FontPlatformData(m_platformData, scaledSize), isCustomFont() ? CustomFontData::create() : nullptr); 387 return SimpleFontData::create(FontPlatformData(m_platformData, scaledSize), isCustomFont() ? CustomFontData::create() : nullptr);
394 } 388 }
395 389
396 void SimpleFontData::determinePitch() 390 void SimpleFontData::determinePitch()
397 { 391 {
398 m_treatAsFixedPitch = platformData().isFixedPitch(); 392 m_treatAsFixedPitch = platformData().isFixedPitch();
399 } 393 }
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 if (glyphs[i]) { 484 if (glyphs[i]) {
491 pageToFill->setGlyphDataForIndex(offset + i, glyphs[i], this); 485 pageToFill->setGlyphDataForIndex(offset + i, glyphs[i], this);
492 haveGlyphs = true; 486 haveGlyphs = true;
493 } 487 }
494 } 488 }
495 489
496 return haveGlyphs; 490 return haveGlyphs;
497 } 491 }
498 492
499 } // namespace blink 493 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698