Hey guys, I was just wondering how to convert a font into a byte array, I know it is possible and I created a program which converts a string into a byte array, but I wiped my hard drive and forgot to back it up, as I do not have time to create another I am asking if you guys know another way.
you want to convert a string to a bytearray or a font file to a byte array?
Originally Posted by Departure
you want to convert a string to a bytearray or a font file to a byte array?
Either one works fine for me. Preferably font file
a String kinda is an array of chars in ascii and a char is a signed byte
Create and array type byte the length of the string, and then iterate through the string from index 0 to length-1, casting each char to a byte and storing it in the equal index of the byte array.
/solved