Why FontStretch does not work in WPF?

后端 未结 5 1946
猫巷女王i
猫巷女王i 2020-12-31 05:23

I am trying setting FontStretch property on a TextBlock in WPF but it seems that it does not work. I tried Expanded, Condensed, etc. but the text appearance

5条回答
  •  轮回少年
    2020-12-31 05:36

    By measuring some text (TextBlock.Measure), I find that Arial Narrow is × 0.82 the width of Arial.

    So textBlock.LayoutTransform = new System.Windows.Media.ScaleTransform(0.82, 1.0); when applied to Arial might approximate Arial Narrow.

提交回复
热议问题