0

I have a custom font that I can load into a PrivateFontCollection and use in the application without installing. However I have to support Chinese and Japanese content as well with SimSun and MS Gothic fonts specifically, with defined preference of one over the other. With admin rights and installed fonts one can use Font Linking in the registry, but I cannot use that here. The system however automatically falls back to display ideographs with either SimSun or MS YaHei or MS PGothic, etc.

Is there any way to control this Font Fallback mechanism in a Windows Forms application?

CainKellye
  • 1,475
  • 1
  • 10
  • 10
  • [Read these notes](https://stackoverflow.com/a/51451303/7444103) and follow the link related to this matter. Also [here](https://stackoverflow.com/a/51612395/7444103). Follow the link about *Using Font Fallback*. – Jimi Jan 15 '19 at 15:23
  • Thanks! Does this work with all text controls, application-wise? Labels, Buttons, simple TextBoxes? – CainKellye Jan 16 '19 at 07:29
  • The Font Fallback feature is applied to all .Net objects that derive from `Control`, where the setter of the Font property will call: `private void SetWindowFont(){ SendMessage(NativeMethods.WM_SETFONT, FontHandle, 0); }`. It's handled internally. – Jimi Jan 16 '19 at 07:56
  • I managed to make this work with a RichTextBox but the Label does not react on what font name I send. – CainKellye Jan 29 '19 at 07:06

0 Answers0