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

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

Issue 199423003: Add plumbing for font-stretch (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 scope.fontDescription().setWeight(scope.fontDescription().bolderWeight()); 367 scope.fontDescription().setWeight(scope.fontDescription().bolderWeight());
368 } 368 }
369 369
370 void FontBuilder::setWeightLighter() 370 void FontBuilder::setWeightLighter()
371 { 371 {
372 FontDescriptionChangeScope scope(this); 372 FontDescriptionChangeScope scope(this);
373 373
374 scope.fontDescription().setWeight(scope.fontDescription().lighterWeight()); 374 scope.fontDescription().setWeight(scope.fontDescription().lighterWeight());
375 } 375 }
376 376
377 void FontBuilder::setStretch(FontStretch fontStretch)
378 {
379 FontDescriptionChangeScope scope(this);
380
381 scope.fontDescription().setStretch(fontStretch);
382 }
383
377 void FontBuilder::setFontVariantLigaturesInitial() 384 void FontBuilder::setFontVariantLigaturesInitial()
378 { 385 {
379 FontDescriptionChangeScope scope(this); 386 FontDescriptionChangeScope scope(this);
380 387
381 scope.fontDescription().setCommonLigaturesState(FontDescription::NormalLigat uresState); 388 scope.fontDescription().setCommonLigaturesState(FontDescription::NormalLigat uresState);
382 scope.fontDescription().setDiscretionaryLigaturesState(FontDescription::Norm alLigaturesState); 389 scope.fontDescription().setDiscretionaryLigaturesState(FontDescription::Norm alLigaturesState);
383 scope.fontDescription().setHistoricalLigaturesState(FontDescription::NormalL igaturesState); 390 scope.fontDescription().setHistoricalLigaturesState(FontDescription::NormalL igaturesState);
384 scope.fontDescription().setContextualLigaturesState(FontDescription::NormalL igaturesState); 391 scope.fontDescription().setContextualLigaturesState(FontDescription::NormalL igaturesState);
385 } 392 }
386 393
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
677 FontOrientation fontOrientation; 684 FontOrientation fontOrientation;
678 NonCJKGlyphOrientation glyphOrientation; 685 NonCJKGlyphOrientation glyphOrientation;
679 getFontAndGlyphOrientation(documentStyle, fontOrientation, glyphOrientation) ; 686 getFontAndGlyphOrientation(documentStyle, fontOrientation, glyphOrientation) ;
680 fontDescription.setOrientation(fontOrientation); 687 fontDescription.setOrientation(fontOrientation);
681 fontDescription.setNonCJKGlyphOrientation(glyphOrientation); 688 fontDescription.setNonCJKGlyphOrientation(glyphOrientation);
682 documentStyle->setFontDescription(fontDescription); 689 documentStyle->setFontDescription(fontDescription);
683 documentStyle->font().update(fontSelector); 690 documentStyle->font().update(fontSelector);
684 } 691 }
685 692
686 } 693 }
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