Designing a Custom Font Dialog/Selector for C# that filters out non true type fonts

后端 未结 3 1574
暗喜
暗喜 2020-12-07 02:00

Since the inbuilt Font Dialog returns a \'Not a True Type Font\' Exception on selecting a Non True Type Font, I\'m trying to create a Custom Font Dialog using Font-families

3条回答
  •  醉梦人生
    2020-12-07 02:20

    OK, Umar, You should try:

    1) Using the 'FontFamily.IsStyleAvailable' to avoid/minimize the need for catching exceptions -- and thus miss out on some available Fonts. 2) Play a Little with Graphics.MeasureString to set a size for each individual font that looks best AND will get you columns of equal height...

    Happy trying :)

    Jens, Denmark.

提交回复
热议问题