20freetype Module
20.1Overview
The freetype
module provices measures to access vectorized font data using freetype library. To utilize it, import the freetype
module using import
function.
20.2Module Function
freetype.sysfontpath(name:string):map
20.3freetype.BBox Class
20.4freetype.BDF_Property Class
20.5freetype.Bitmap Class
20.5.1Method
freetype.Bitmap#Embolden(strength:number):reduce
20.6freetype.CharMap Class
20.6.1Method
freetype.CharMap#Get_Index()
20.7freetype.FTC_CMapCache Class
20.8freetype.FTC_ImageCache Class
20.9freetype.FTC_ImageType Class
20.10freetype.FTC_Manager Class
20.11freetype.FTC_Node Class
20.12freetype.FTC_SBit Class
20.13freetype.FTC_SBitCache Class
20.14freetype.FTC_Scaler Class
20.15freetype.Face Class
20.15.1Constructor
freetype.Face(stream:stream, face_index:number => 0):map {block?}
20.15.2Method
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
20.16freetype.Glyph Class
20.16.1Method
freetype.Glyph#Copy()
freetype.Glyph#Stroke(stroker:freetype.Stroker):reduce
freetype.Glyph#StrokeBorder(stroker:freetype.Stroker, inside:boolean):reduce
20.17freetype.GlyphSlot Class
20.17.1Method
freetype.GlyphSlot#Get_Glyph()
freetype.GlyphSlot#Render(render_mode:number):reduce
20.18freetype.Matrix Class
20.18.1Constructor
freetype.Matrix(array:array@double):map {block?}
20.18.2Method
freetype.Matrix#Multiply(matrix:freetype.Matrix):reduce
freetype.Matrix#Invert():reduce
20.19freetype.Outline Class
20.19.1Method
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
20.20freetype.Raster Class
20.21freetype.Span Class
20.22freetype.Stroker Class
20.22.1Constructor
freetype.Stroker():map {block?}
20.22.2Method
freetype.Stroker#BeginSubPath(to:freetype.Vector, open:boolean):reduce
20.23freetype.Vector Class
20.23.1Constructor
freetype.Vector(x:number, y:number):map {block?}
20.23.2Method
freetype.Vector#Length()
freetype.Vector#Transform(matrix:freetype.Matrix):reduce
20.24freetype.font Class
20.25Constructor
freetype.font(face:freetype.Face):map {block?}
20.25.1Method
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
20.26Extension 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.
20.27Thanks
This module uses FreeType library which is distributed in the following site: