本文介绍了获取特定字体的字体样式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有两个组合框combobox1& combobox2我要在combobox1中获取所有系统字体,我需要获取combobox2中选定字体的字体样式.
i have two comboboxes combobox1 & combobox2 i am getting all system fonts in combobox1 i need to get fontstyles of a select font in combobox2
Dim fc As New Drawing.Text.InstalledFontCollection
Dim ff As FontFamily() = fc.Families()
For Each family As FontFamily In ff
Me.ComboBox1.Items.Add(family.Name)
Next
当我为例如选择字体名称时. Monotype Corsiva字体只有斜体&斜体粗体字体样式
简而言之,我需要获取与我在combobox1中选择的字体相关的字体,因为字体针对不同的字体而有所不同
when i select font name for eg. Monotype Corsiva font have only italic & italic bold font style
in brief i need to get fontstyles related to the font i select in combobox1 because fontstyles are different for different fonts
推荐答案
这篇关于获取特定字体的字体样式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!