canvas는 기본적으로 메타폰트를 이용하기 때문에 사용자임의 메타폰트를 만들어서 등록하여 주면 만들어진 폰트를 이용할 수 있다는 내용입니다.
그래서 CreateMetaFont를 사용하여 사용자임의 메타폰트를 맹글어요.
Both CanvasDrawTextAtPoint and CanvasDrawText use a metafont to contain the typeface information, point size, and text styles such as bold, underline, italic, and strikeout. These metafonts are used in the LabWindows/CVI environment. Some examples of predefined metafonts include VAL_MENU_META_FONT, VAL_DIALOG_META_FONT, VAL_EDITOR_META_FONT, and VAL_APP_META_FONT.
To create your own metafont call the CreateMetaFont function and then use the name of the metafont in your CanvasDrawText or CanvasDrawTextAtPoint function calls. Below is a snippet of code that creates a metafont called MyMetaFont. This metafont defines the typeface as Verdana, the size as 15 point, and makes the text underlined and bold.
NI 홈페이지에서 검색해서 찾은 답입니다. 혹 모르시는 분은 참고하세요..^^;
canvas는 기본적으로 메타폰트를 이용하기 때문에 사용자임의 메타폰트를 만들어서 등록하여 주면 만들어진 폰트를 이용할 수 있다는 내용입니다.
그래서 CreateMetaFont를 사용하여 사용자임의 메타폰트를 맹글어요.
Both CanvasDrawTextAtPoint and CanvasDrawText use a metafont to contain the typeface information, point size, and text styles such as bold, underline, italic, and strikeout. These metafonts are used in the LabWindows/CVI environment. Some examples of predefined metafonts include VAL_MENU_META_FONT, VAL_DIALOG_META_FONT, VAL_EDITOR_META_FONT, and VAL_APP_META_FONT.
To create your own metafont call the CreateMetaFont function and then use the name of the metafont in your CanvasDrawText or CanvasDrawTextAtPoint function calls. Below is a snippet of code that creates a metafont called MyMetaFont. This metafont defines the typeface as Verdana, the size as 15 point, and makes the text underlined and bold.
CreateMetaFont ("MyMetaFont", "Verdana", 15, 1, 0, 1, 0);
CanvasDrawTextAtPoint (panelHandle, PANEL_CANVAS, "sample text", "MyMetaFont", MakePoint(0,0), VAL_UPPER_LEFT);