Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
display unicode text(by windows api)
#6
I haven't had a chance to look closely over this, and from what I see just scrolling above, there appears to be as much code remarked out as there is code active, so I can't really follow it much on my browser. 

Let me give a quick demo of displaying chinese characters for you.  I'm not fluent in the language so have no idea if I'm missing something here, but here's how to get a simplified chinese to display:

Code: (Select All)
Screen _NewImage(800, 600, 32)
chinese$ = _ReadFile$("Chinese-Simplified8.txt") 'read out chinese file
Screen _NewImage(800, 600, 32) '32-bit screen for custom font
f = _LoadFont("msyh.ttc", 16, "monospace") 'load the windows built in chinese font
_Font f 'swap to that font
_UPrintString (0, 0), chinese$, 800, 8, f 'print the file

'note that there are no breakpoints in this file and no wordwrap.  You'd need to detect those and split them yourself.

The font used is the one packaged for windows and should be readily available for most systems (I think).
The file with the chinese is below. Feel free to grab and test it.


Attached Files
.txt   Chinese-Simplified8.txt (Size: 29.28 KB / Downloads: 24)
Reply


Messages In This Thread
display unicode text(by windows api) - by qbfans - 12-06-2025, 02:33 AM
RE: display unicode text(by windows api) - by SMcNeill - 12-06-2025, 06:33 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Inkey Literal Key Display Pete 5 589 01-07-2026, 03:57 AM
Last Post: Pete
  Text Effects 2 2112 6 677 10-30-2025, 11:13 PM
Last Post: Unseen Machine
  Text Encryption-Decryption 2112 6 754 10-21-2025, 11:51 AM
Last Post: euklides
  Vacuum Flourescent Display Clock With Alarm SierraKen 5 1,196 06-07-2025, 11:02 PM
Last Post: SierraKen
  Upside-Down Big Text SierraKen 2 677 02-22-2025, 01:52 AM
Last Post: SierraKen

Forum Jump:


Users browsing this thread: 1 Guest(s)