qnx.system.FontSettings

FontSettings

Properties | Methods


Packageqnx.system
Classpublic class FontSettings
InheritanceFontSettings Inheritance flash.events.EventDispatcher

The FontSettings class exposes font settings of the device. These are set by the user in the Settings application on the device. Application developers must set the useUserSettings property to true in order to use the values that the user has set. By default useUserSettings is set to false and font sizes will be calculated based on 8pt.

Class information:
BlackBerry 10 Version:   10.0.0



Public Properties

 PropertyDefined By
  contentSize : int
[read-only] Gets the content size in pixels.
FontSettings
  fontFamily : String
[read-only] Gets the font family of the device.
FontSettings
  fontSettings : FontSettings
[static] [read-only] Gets a Singleton FontSettings instance.
FontSettings
  largeSize : int
[read-only] Gets the large size in pixels.
FontSettings
  smallSize : int
[read-only] Gets the small content size in pixels.
FontSettings
  useUserSettings : Boolean
Gets or sets wether the font settings properties in this class are set based on the user defined settings on the device.
FontSettings
  xLargeSize : int
[read-only] Gets the extra large size in pixels.
FontSettings
  xSmallSize : int
[read-only] Gets the extra small content size in pixels.
FontSettings
  xxLargeSize : int
[read-only] Gets the extra extra large size in pixels.
FontSettings
  xxSmallSize : int
[read-only] Gets the extra extra small content size in pixels.
FontSettings

Public Methods

 MethodDefined By
  
FontSettings(enforcer:SingletonEnforcer)
Constructs a FontSettings instance.
FontSettings
  
getScaledSize(scale:Number):int
Returns a scaled font size, in pixels, based on the content size.
FontSettings

Property Detail

contentSize


contentSize:int  [read-only]

Gets the content size in pixels.


Implementation

public function get contentSize():int

fontFamily


fontFamily:String  [read-only]

Gets the font family of the device.


Implementation

public function get fontFamily():String

fontSettings


fontSettings:FontSettings  [read-only]

Gets a Singleton FontSettings instance.


Implementation

public static function get fontSettings():FontSettings

largeSize


largeSize:int  [read-only]

Gets the large size in pixels.


Implementation

public function get largeSize():int

smallSize


smallSize:int  [read-only]

Gets the small content size in pixels.


Implementation

public function get smallSize():int

useUserSettings


useUserSettings:Boolean

Gets or sets wether the font settings properties in this class are set based on the user defined settings on the device.

If set to false default font settings will be used. If set to true the user defined settings on the device will be used.

The default value is false.


Implementation

public function get useUserSettings():Boolean
public function set useUserSettings(value:Boolean):void

xLargeSize


xLargeSize:int  [read-only]

Gets the extra large size in pixels.


Implementation

public function get xLargeSize():int

xSmallSize


xSmallSize:int  [read-only]

Gets the extra small content size in pixels.


Implementation

public function get xSmallSize():int

xxLargeSize


xxLargeSize:int  [read-only]

Gets the extra extra large size in pixels.


Implementation

public function get xxLargeSize():int

xxSmallSize


xxSmallSize:int  [read-only]

Gets the extra extra small content size in pixels.


Implementation

public function get xxSmallSize():int

Constructor Detail

FontSettings()


public function FontSettings(enforcer:SingletonEnforcer)

Constructs a FontSettings instance. Do not call this method directly. Use the FontSettings.fontSettings property instead.

Parameters

enforcer:SingletonEnforcer

See also

fontSettings

Method Detail

getScaledSize()


public function getScaledSize(scale:Number):int

Returns a scaled font size, in pixels, based on the content size. It is important to note that sizes are scaled based on point sizes and then converted to pixels afterwards.

Parameters

scale:Number — The scale factor of the font size.

Returns

int




comments powered by Disqus