OLD | NEW |
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 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
353 scope.fontDescription().setSpecifiedSize(size); | 353 scope.fontDescription().setSpecifiedSize(size); |
354 } | 354 } |
355 | 355 |
356 void FontBuilder::setWeight(FontWeight fontWeight) | 356 void FontBuilder::setWeight(FontWeight fontWeight) |
357 { | 357 { |
358 FontDescriptionChangeScope scope(this); | 358 FontDescriptionChangeScope scope(this); |
359 | 359 |
360 scope.fontDescription().setWeight(fontWeight); | 360 scope.fontDescription().setWeight(fontWeight); |
361 } | 361 } |
362 | 362 |
363 void FontBuilder::setWeightBolder() | |
364 { | |
365 FontDescriptionChangeScope scope(this); | |
366 | |
367 scope.fontDescription().setWeight(scope.fontDescription().bolderWeight()); | |
368 } | |
369 | |
370 void FontBuilder::setWeightLighter() | |
371 { | |
372 FontDescriptionChangeScope scope(this); | |
373 | |
374 scope.fontDescription().setWeight(scope.fontDescription().lighterWeight()); | |
375 } | |
376 | |
377 void FontBuilder::setStretch(FontStretch fontStretch) | 363 void FontBuilder::setStretch(FontStretch fontStretch) |
378 { | 364 { |
379 FontDescriptionChangeScope scope(this); | 365 FontDescriptionChangeScope scope(this); |
380 | 366 |
381 scope.fontDescription().setStretch(fontStretch); | 367 scope.fontDescription().setStretch(fontStretch); |
382 } | 368 } |
383 | 369 |
384 void FontBuilder::setScript(const String& locale) | 370 void FontBuilder::setScript(const String& locale) |
385 { | 371 { |
386 FontDescriptionChangeScope scope(this); | 372 FontDescriptionChangeScope scope(this); |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
596 FontOrientation fontOrientation; | 582 FontOrientation fontOrientation; |
597 NonCJKGlyphOrientation glyphOrientation; | 583 NonCJKGlyphOrientation glyphOrientation; |
598 getFontAndGlyphOrientation(documentStyle, fontOrientation, glyphOrientation)
; | 584 getFontAndGlyphOrientation(documentStyle, fontOrientation, glyphOrientation)
; |
599 fontDescription.setOrientation(fontOrientation); | 585 fontDescription.setOrientation(fontOrientation); |
600 fontDescription.setNonCJKGlyphOrientation(glyphOrientation); | 586 fontDescription.setNonCJKGlyphOrientation(glyphOrientation); |
601 documentStyle->setFontDescription(fontDescription); | 587 documentStyle->setFontDescription(fontDescription); |
602 documentStyle->font().update(fontSelector); | 588 documentStyle->font().update(fontSelector); |
603 } | 589 } |
604 | 590 |
605 } | 591 } |
OLD | NEW |