10-04-2024, 10:53 AM
@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:
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!
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!