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

Side by Side Diff: Source/core/css/resolver/FontBuilder.cpp

Issue 203523002: Reland "Add plumbing for font-stretch" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: w/fix for ASSERT Created 6 years, 5 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
« no previous file with comments | « Source/core/css/resolver/FontBuilder.h ('k') | Source/core/css/resolver/StyleBuilderCustom.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
4 * Copyright (C) 2013 Google Inc. All rights reserved. 4 * Copyright (C) 2013 Google Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 scope.fontDescription().setWeight(scope.fontDescription().bolderWeight()); 366 scope.fontDescription().setWeight(scope.fontDescription().bolderWeight());
367 } 367 }
368 368
369 void FontBuilder::setWeightLighter() 369 void FontBuilder::setWeightLighter()
370 { 370 {
371 FontDescriptionChangeScope scope(this); 371 FontDescriptionChangeScope scope(this);
372 372
373 scope.fontDescription().setWeight(scope.fontDescription().lighterWeight()); 373 scope.fontDescription().setWeight(scope.fontDescription().lighterWeight());
374 } 374 }
375 375
376 void FontBuilder::setStretch(FontStretch fontStretch)
377 {
378 FontDescriptionChangeScope scope(this);
379
380 scope.fontDescription().setStretch(fontStretch);
381 }
382
376 void FontBuilder::setFontVariantLigaturesInitial() 383 void FontBuilder::setFontVariantLigaturesInitial()
377 { 384 {
378 FontDescriptionChangeScope scope(this); 385 FontDescriptionChangeScope scope(this);
379 386
380 scope.fontDescription().setCommonLigaturesState(FontDescription::NormalLigat uresState); 387 scope.fontDescription().setCommonLigaturesState(FontDescription::NormalLigat uresState);
381 scope.fontDescription().setDiscretionaryLigaturesState(FontDescription::Norm alLigaturesState); 388 scope.fontDescription().setDiscretionaryLigaturesState(FontDescription::Norm alLigaturesState);
382 scope.fontDescription().setHistoricalLigaturesState(FontDescription::NormalL igaturesState); 389 scope.fontDescription().setHistoricalLigaturesState(FontDescription::NormalL igaturesState);
383 scope.fontDescription().setContextualLigaturesState(FontDescription::NormalL igaturesState); 390 scope.fontDescription().setContextualLigaturesState(FontDescription::NormalL igaturesState);
384 } 391 }
385 392
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
662 FontOrientation fontOrientation; 669 FontOrientation fontOrientation;
663 NonCJKGlyphOrientation glyphOrientation; 670 NonCJKGlyphOrientation glyphOrientation;
664 getFontAndGlyphOrientation(documentStyle, fontOrientation, glyphOrientation) ; 671 getFontAndGlyphOrientation(documentStyle, fontOrientation, glyphOrientation) ;
665 fontDescription.setOrientation(fontOrientation); 672 fontDescription.setOrientation(fontOrientation);
666 fontDescription.setNonCJKGlyphOrientation(glyphOrientation); 673 fontDescription.setNonCJKGlyphOrientation(glyphOrientation);
667 documentStyle->setFontDescription(fontDescription); 674 documentStyle->setFontDescription(fontDescription);
668 documentStyle->font().update(fontSelector); 675 documentStyle->font().update(fontSelector);
669 } 676 }
670 677
671 } 678 }
OLDNEW
« no previous file with comments | « Source/core/css/resolver/FontBuilder.h ('k') | Source/core/css/resolver/StyleBuilderCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698