Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Unicode characters above 127
#3
@PhilofPerth I made a PETSCII translator (sorta) using unicode font to QB64PE if you are interested it is here:
https://github.com/grymmjack/qb64/blob/8...76C1-L83C7

In my case I wanted to translate the entire PETSCII range:

Code: (Select All)

FONT_FILE$ = "ASSETS/C64_Pro-STYLE.ttf"
FONT_STYLE$ = "MONOSPACE"
F& = _LOADFONT(FONT_FILE$, 16, FONT_STYLE$)
_FONT F&

PETSCII_UPPER_PUA = 60928 '&HEE00

FOR I = 0 TO 255
    _MAPUNICODE PETSCII_UPPER_PUA + I TO I
NEXT I

This was stored int the font in the unicode Private Use Area, contiguously. So it was a matter of finding the character I wanted in the font, using charmap, then noting the hex code, (I could have just used &HEE00 I guess - but for some reason my brain wanted decimals since I was mapping to decimal range 0-255). Anyway, the end result worked exactly as intended.

I also had to have the font loaded of course, first.

Good luck!
grymmjack (gj!)
GitHubYouTube | Soundcloud | 16colo.rs
Reply


Messages In This Thread
Unicode characters above 127 - by PhilOfPerth - 10-04-2024, 05:08 AM
RE: Unicode characters above 127 - by SMcNeill - 10-04-2024, 06:42 AM
RE: Unicode characters above 127 - by grymmjack - 10-04-2024, 10:53 AM
RE: Unicode characters above 127 - by RhoSigma - 10-04-2024, 10:54 AM
RE: Unicode characters above 127 - by grymmjack - 10-04-2024, 11:13 AM
RE: Unicode characters above 127 - by PhilOfPerth - 10-05-2024, 12:43 AM
RE: Unicode characters above 127 - by RhoSigma - 10-05-2024, 11:07 AM
RE: Unicode characters above 127 - by PhilOfPerth - 10-07-2024, 12:43 AM
RE: Unicode characters above 127 - by Kernelpanic - 10-05-2024, 11:46 AM
RE: Unicode characters above 127 - by RhoSigma - 10-05-2024, 11:52 AM
RE: Unicode characters above 127 - by PhilOfPerth - 10-05-2024, 11:30 PM



Users browsing this thread: 2 Guest(s)