equal
deleted
inserted
replaced
1 // Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). |
1 // Copyright (c) 1998-2010 Nokia Corporation and/or its subsidiary(-ies). |
2 // All rights reserved. |
2 // All rights reserved. |
3 // This component and the accompanying materials are made available |
3 // This component and the accompanying materials are made available |
4 // under the terms of "Eclipse Public License v1.0" |
4 // under the terms of "Eclipse Public License v1.0" |
5 // which accompanies this distribution, and is available |
5 // which accompanies this distribution, and is available |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
343 /** Constructs a TFontSpec object with the specified typeface and height. |
343 /** Constructs a TFontSpec object with the specified typeface and height. |
344 |
344 |
345 The object's font style is set to the default: EPostureUpright, EStrokeWeightNormal, |
345 The object's font style is set to the default: EPostureUpright, EStrokeWeightNormal, |
346 and EPrintPosNormal. |
346 and EPrintPosNormal. |
347 |
347 |
348 @param aTypefaceName The name of the typeface (e.g. "Roman"). |
348 @param aTypefaceName The name of the typeface (e.g. "Roman"). It should be no |
349 @param aHeight The height of the typeface, in twips. */ |
349 longer than KMaxTypefaceNameLength characters in length. |
350 { |
350 @param aHeight The height of the typeface, in twips. |
351 iTypeface.iName=aTypefaceName; |
351 @panic GDI 6, if aTypefaceName is more than KMaxTypefaceNameLength characters long. |
|
352 */ |
|
353 { |
|
354 iTypeface.SetName(aTypefaceName); |
352 } |
355 } |
353 |
356 |
354 |
357 |
355 EXPORT_C TBool TFontSpec::operator==(const TFontSpec& aFontSpec) const |
358 EXPORT_C TBool TFontSpec::operator==(const TFontSpec& aFontSpec) const |
356 /** Compares this font specification with another. |
359 /** Compares this font specification with another. |
601 @internalTechnology |
604 @internalTechnology |
602 */ |
605 */ |
603 EXPORT_C TInt TTypeface::ScriptTypeForMetrics() const |
606 EXPORT_C TInt TTypeface::ScriptTypeForMetrics() const |
604 { |
607 { |
605 return (KTTypefaceMaskScript & iFlags) >> KTTypefaceBitsNumAttrib; |
608 return (KTTypefaceMaskScript & iFlags) >> KTTypefaceBitsNumAttrib; |
|
609 } |
|
610 |
|
611 /** |
|
612 Sets the name of the typeface. This method should be used rather than |
|
613 directly accessing the iName public member. |
|
614 @param aName The name of the typeface (e.g. "Roman"). It should be no |
|
615 longer than KMaxTypefaceNameLength characters in length. |
|
616 @panic GDI 6, if aName is more than KMaxTypefaceNameLength characters |
|
617 long. |
|
618 */ |
|
619 EXPORT_C void TTypeface::SetName(const TDesC& aName) |
|
620 { |
|
621 GDI_ASSERT_ALWAYS(aName.Length() <= KMaxTypefaceNameLength, EGdiPanic_TypefaceNameOverflow); |
|
622 iName=aName; |
|
623 } |
|
624 |
|
625 /** |
|
626 Returns the name of the typeface. |
|
627 @return The name of the typeface. |
|
628 */ |
|
629 EXPORT_C const TDesC& TTypeface::Name() const |
|
630 { |
|
631 return iName; |
606 } |
632 } |
607 |
633 |
608 |
634 |
609 // |
635 // |
610 // CFont |
636 // CFont |