关于font(ttf): 选择一种字体后,如何枚举出字符集(比如:a,b,c,d(该字体的风格)等(100分)

  • 主题发起人 主题发起人 chinesetree
  • 开始时间 开始时间
C

chinesetree

Unregistered / Unconfirmed
GUEST, unregistred user!
关于font(ttf): 选择一种字体后,如何枚举出字符集(比如:a,b,c,d(该字体的风格)<br>谢谢~
 
不太明白你的意思<br><br>比如 Label.Caption := 'A B C D'<br>将 Label 的字体设置为该 选中的字体
 
比如:<br>打开一个系统目录下的Fonts打开一个*.ttf文件,会发现<br>里面的图形,<br>我的意思是取出里面的图形,可以自由选取<br>
 
你说的是不是这样<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if ls_Font_Style = '粗体' then<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Button.Font.Style := [fsBold]<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;else if ls_Font_Style = '斜体' then<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Button.Font.Style := [fsItalic]<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;else if ls_Font_Style = '下划线' then<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Button.Font.Style := [fsUnderline]<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;else if ls_Font_Style = '删除线' then<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Button.Font.Style := [fsStrikeOut];<br><br>希望能给你一点思路!!<br>
 
谢谢,打开webdings.ttf文件,会发现里面的图形,<br>我想用程序方法,取出里面的图形<br>
 
里面的图像就是字体呀<br><br>procedure TForm1.FormPaint(Sender: TObject);<br>var &nbsp;R : TRect;<br>begin<br>&nbsp; R := RECT(10,10,300,100);<br>&nbsp; Canvas.Font.Name := 'Wingdings';<br>&nbsp; Canvas.Font.Size := 32;<br>&nbsp; DrawText(Canvas.Handle,'ABCDEFG',8,R,0);<br>end;
 

Similar threads

D
回复
0
查看
1K
DelphiTeacher的专栏
D
S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
I
回复
0
查看
628
import
I
后退
顶部