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

Side by Side Diff: Source/platform/fonts/cocoa/FontPlatformDataCocoa.mm

Issue 275913005: Remove usePrinterFont() property of FontDescription (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebaselinining small caps cases, and subpixel virtual set Created 6 years, 7 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 * This file is part of the internal font implementation. 2 * This file is part of the internal font implementation.
3 * 3 *
4 * Copyright (C) 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. 4 * Copyright (C) 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
5 * Copyright (c) 2010 Google Inc. All rights reserved. 5 * Copyright (c) 2010 Google Inc. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 20 matching lines...) Expand all
31 #if OS(MACOSX) 31 #if OS(MACOSX)
32 #import "platform/fonts/harfbuzz/HarfBuzzFace.h" 32 #import "platform/fonts/harfbuzz/HarfBuzzFace.h"
33 #include "third_party/skia/include/ports/SkTypeface_mac.h" 33 #include "third_party/skia/include/ports/SkTypeface_mac.h"
34 #endif 34 #endif
35 35
36 namespace WebCore { 36 namespace WebCore {
37 37
38 // These CoreText Text Spacing feature selectors are not defined in CoreText. 38 // These CoreText Text Spacing feature selectors are not defined in CoreText.
39 enum TextSpacingCTFeatureSelector { TextSpacingProportional, TextSpacingFullWidt h, TextSpacingHalfWidth, TextSpacingThirdWidth, TextSpacingQuarterWidth }; 39 enum TextSpacingCTFeatureSelector { TextSpacingProportional, TextSpacingFullWidt h, TextSpacingHalfWidth, TextSpacingThirdWidth, TextSpacingQuarterWidth };
40 40
41 FontPlatformData::FontPlatformData(NSFont *nsFont, float size, bool isPrinterFon t, bool syntheticBold, bool syntheticOblique, FontOrientation orientation, FontW idthVariant widthVariant) 41 FontPlatformData::FontPlatformData(NSFont *nsFont, float size, bool syntheticBol d, bool syntheticOblique, FontOrientation orientation, FontWidthVariant widthVar iant)
42 : m_syntheticBold(syntheticBold) 42 : m_syntheticBold(syntheticBold)
43 , m_syntheticOblique(syntheticOblique) 43 , m_syntheticOblique(syntheticOblique)
44 , m_orientation(orientation) 44 , m_orientation(orientation)
45 , m_size(size) 45 , m_size(size)
46 , m_widthVariant(widthVariant) 46 , m_widthVariant(widthVariant)
47 , m_font(nsFont) 47 , m_font(nsFont)
48 , m_isColorBitmapFont(false) 48 , m_isColorBitmapFont(false)
49 , m_isCompositeFontReference(false) 49 , m_isCompositeFontReference(false)
50 , m_isPrinterFont(isPrinterFont)
51 { 50 {
52 ASSERT_ARG(nsFont, nsFont); 51 ASSERT_ARG(nsFont, nsFont);
53 52
54 CGFontRef cgFont = 0; 53 CGFontRef cgFont = 0;
55 loadFont(nsFont, size, m_font, cgFont); 54 loadFont(nsFont, size, m_font, cgFont);
56 55
57 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070 56 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
58 // FIXME: Chromium: The following code isn't correct for the Chromium port s ince the sandbox might 57 // FIXME: Chromium: The following code isn't correct for the Chromium port s ince the sandbox might
59 // have blocked font loading, in which case we'll only have the real loaded font file after the call to loadFont(). 58 // have blocked font loading, in which case we'll only have the real loaded font file after the call to loadFont().
60 { 59 {
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 #ifndef NDEBUG 322 #ifndef NDEBUG
324 String FontPlatformData::description() const 323 String FontPlatformData::description() const
325 { 324 {
326 RetainPtr<CFStringRef> cgFontDescription(AdoptCF, CFCopyDescription(cgFont() )); 325 RetainPtr<CFStringRef> cgFontDescription(AdoptCF, CFCopyDescription(cgFont() ));
327 return String(cgFontDescription.get()) + " " + String::number(m_size) 326 return String(cgFontDescription.get()) + " " + String::number(m_size)
328 + (m_syntheticBold ? " synthetic bold" : "") + (m_syntheticOblique ? " synthetic oblique" : "") + (m_orientation ? " vertical orientation" : ""); 327 + (m_syntheticBold ? " synthetic bold" : "") + (m_syntheticOblique ? " synthetic oblique" : "") + (m_orientation ? " vertical orientation" : "");
329 } 328 }
330 #endif 329 #endif
331 330
332 } // namespace WebCore 331 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/platform/fonts/FontPlatformData.cpp ('k') | Source/platform/fonts/mac/ComplexTextController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698