freetype Module
Overview
The freetype
module provices measures to access vectorized font data using freetype library. To utilize it, import the freetype
module using import
function.
Module Function
freetype.sysfontpath(name:string):map
freetype.BBox Class
freetype.BDF_Property Class
freetype.Bitmap Class
Method
freetype.Bitmap#Embolden(strength:number):reduce
freetype.CharMap Class
Method
freetype.CharMap#Get_Index()
freetype.FTC_CMapCache Class
freetype.FTC_ImageCache Class
freetype.FTC_ImageType Class
freetype.FTC_Manager Class
freetype.FTC_Node Class
freetype.FTC_SBit Class
freetype.FTC_SBitCache Class
freetype.FTC_Scaler Class
freetype.Face Class
Constructor
freetype.Face(stream:stream, face_index:number => 0):map {block?}
Method
freetype.Face#CheckTrueTypePatents()
freetype.Face#Get_Advance(glyph_index:number, load_flags:number)
freetype.Face#Get_Advances(glyph_index_start:number, count:number, load_flags:number)
freetype.Face#Get_Glyph_Name(glyph_index:number)
freetype.Face#Get_Postscript_Name()
freetype.Face#Get_Kerning(left_glyph:number, right_glyph:number, kern_mode:number)
freetype.Face#Load_Char(char_code:number, load_flags:number):reduce
freetype.Face#Load_Glyph(glyph_index:number, load_flags:number):reduce
freetype.Face#Set_Charmap(charmap:freetype.CharMap):reduce
freetype.Face#Set_Pixel_Sizes(pixel_width:number, pixel_height:number):reduce
freetype.Glyph Class
Method
freetype.Glyph#Copy()
freetype.Glyph#Stroke(stroker:freetype.Stroker):reduce
freetype.Glyph#StrokeBorder(stroker:freetype.Stroker, inside:boolean):reduce
freetype.GlyphSlot Class
Method
freetype.GlyphSlot#Get_Glyph()
freetype.GlyphSlot#Render(render_mode:number):reduce
freetype.Matrix Class
Constructor
freetype.Matrix(array:array@double):map {block?}
Method
freetype.Matrix#Multiply(matrix:freetype.Matrix):reduce
freetype.Matrix#Invert():reduce
freetype.Outline Class
Method
freetype.Outline#Translate(xOffset:freetype.Matrix, yOffset:freetype.Matrix):reduce
freetype.Outline#Transform(matrix:freetype.Matrix):reduce
freetype.Outline#Embolden(strength:number):reduce
freetype.Outline#Reverse():reduce
freetype.Raster Class
freetype.Span Class
freetype.Stroker Class
Constructor
freetype.Stroker():map {block?}
Method
freetype.Stroker#BeginSubPath(to:freetype.Vector, open:boolean):reduce
freetype.Vector Class
Constructor
freetype.Vector(x:number, y:number):map {block?}
Method
freetype.Vector#Length()
freetype.Vector#Transform(matrix:freetype.Matrix):reduce
freetype.font Class
Constructor
freetype.font(face:freetype.Face):map {block?}
Method
freetype.font#cleardeco():reduce
freetype.font#drawtext(image:image, x:number, y:number, str:string):map:reduce {block?}
Draws a text on the image.
freetype.font#calcsize(str:string):map
freetype.font#calcbbox(x:number, y:number, str:string):map
Extension to image Class
The freetype
module extends the image
class with following methods:
image#drawtext(font:freetype.font, x:number, y:number, str:string):map:reduce {block?}
Draws a text on the image.
Thanks
This module uses FreeType library which is distributed in the following site: