1

I am compiling with the UNICODE directive, so all CStrings are in Unicode. If I place "봉재" into a CString, select a font with "Arial", then use TextOut or TextOutW to display this text, two boxes are displayed.

If I add Latin characters to the text, e.g. "봉재 ABC", then the display becomes two boxes followed by " ABC".

However if I add certain other CJKV characters to the text, e.g. "봉재 /元", the then display shows the text of my CString.

I am guessing that TextOut examines the text, and if certain characters are found, it substitutes fonts for the best display. If my theory is correct, then by adding certain oriental characters to a string, I can force TextOut to substitute a Unicode font, but if I add other oriental characters, TextOut does not substitute the correct font, and the display is inadequate.

How can I get TextOut to always substitute the correct font, or to otherwise display text consistently?

Mike 'Pomax' Kamermans
  • 49,297
  • 16
  • 112
  • 153
gfindlay
  • 11
  • 2
  • technical nit: "oriental" and "european" letters are not a thing. If we're talking Unicode, there's CJKV (chinese, japanese, korean, and vietnamese) as a catchall for "language that use what Unicode calls ideographic glyphs", and there's Latin (quite a few blocks). If your question uses Korean, ask about Korean. That said: show code. Without a minimal example that demonstrates what you're trying, people have to guess, and since their time is valuable too, they'll probably move on to a question that doesn't require guess work. – Mike 'Pomax' Kamermans Jan 28 '16 at 21:47

1 Answers1

1

Note that "Arial" doesn't support CJKV at all, it's just a Latin font. If you want wider Unicode support while maintaining the look of the Arial typeface, use "Arial Unicode". Otherwise, use another font for which you first check that it contains all the glyphs you need rendered.

Mike 'Pomax' Kamermans
  • 49,297
  • 16
  • 112
  • 153