콤포넌트의 설정된 폰트 정보를 font class형태로 반환 받는 API입니다.
Type | Description |
---|---|
class | font class |
font class 선언은 아래와 같습니다. classFont = function() { this.szfontname = "굴림체"; this.nfontsize = 9; this.bfontbold = false; // 또는 폰트 굵기(font-weight) 값(100 ~ 900) this.bfontitalic = false; this.bfontunderline = false; this.bfontstrikeout = false; }
function btnGetFont_on_mouseup(objInst)
{
var txtFont = txtObj.getfont();
factory.consoleprint("font name : " + txtFont.szfontname);
factory.consoleprint("font size : " + txtFont.nfontsize);
factory.consoleprint("font bold : " + txtFont.bfontbold);
factory.consoleprint("font italic : " + txtFont.bfontitalic);
factory.consoleprint("font underline : " + txtFont.bfontunderline);
factory.consoleprint("font strikeout : " + txtFont.bfontstrikeout);
}
** console에 출력 결과 **
font name : Tahoma
font size : 12
font bold : true
font italic : false
font underline : false
font stikeout : false;