TextField:setFont
From GiderosMobile
Available since: Gideros 2016.08
Class: TextField
Description
Sets the Font to use.
TextField:setFont(font)
note: this works only if the TextField has already a font attached to it
Parameters
font: (FontBase) font to use
Example
local font = TTFont.new("fonts/Tahoma.ttf", 32, "", true, 1)
local font2 = TTFont.new("fonts/TahomaBold.ttf", 28, "", true, 1)
local text = TextField.new(font, "This is a text")
text:setFont(font2)
text:setPosition(100, 100)
stage:addChild(text)
- TextField
- TextField.new
- TextField:getLayout
- TextField:getLetterSpacing
- TextField:getLineHeight
- TextField:getPointFromTextPosition
- TextField:getSample
- TextField:getText
- TextField:getTextColor
- TextField:getTextPositionFromPoint
- TextField:setFont
- TextField:setLayout
- TextField:setLetterSpacing
- TextField:setSample
- TextField:setText
- TextField:setTextColor