Win an Ipad
  Developer   Documents   Typeface

Typeface

Typeface demonstrated in Moscrif

Typeface


Typeface class sets up text attributes based on specified typeface and font style. It is used within Paint instance to help decorate text based on its typeface. Instances of Typeface class are immutable; therefore they can be shared between threads.

 

Following example shows how to define a text decorator in Moscrif. We use “Feeseans” font family name, font size twelve, font style bold and text color black.

var textDecorator = new Paint(); textDecorator.textSize  = 12; //set typeface to freeans font, style bold textDecorator.typeface = Typeface.fromName("freesans", #bold); //set color to black textDecorator.color = 0xFF000000;

 

Typeface style symbols

  • normal
  • bold
  • italic
  • bolditalic

 

 

 Canvas   Typeface   ColorFilter 
Write a Comment (0)
Subject
Please complete this mandatory field.
HTML Tags Not Allowed!
Comment
Please complete this mandatory field.