Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Silver, a font for games

A free* pixel font for Latin, Chinese, Korean, Japanese, Cherokee, Runic, Cyrillic, and other character sets. · By Poppy Works

test text

A topic by gnumaru created Dec 17, 2019 Views: 794 Replies: 1
Viewing posts 1 to 3
(1 edit) (+1)

Another person posted a question asking for a text with the supported characters and was told to see the refered unicode blocks topic. Since it can be usefull to have such a text file for testing and comparing, I would just like to point out that one can easily procedurally generate a text file containing all unicode codepoints (or at least the all BMP codepoints). The following python 3 code writes all codepoints from 32 to 1114112 into a utf8 encoded text file. Just replace r'C:\a.txt' with a location where the user running the script write permissions.


with open(r'C:\a.txt', 'wb') as f:
  for i in range(32, 0x110000, 1): # 0x110000 (1114112) is the maximum range of the chr function. more than that it throws "ValueError chr() arg not in range(0x110000)"
    char = chr(i) # convert integer unicode codepoint to unicode character string
    try:
      f.write(char.encode('utf-8'))
    except:
      pass # ignore UnicodeEncodeError 'utf-8' codec can't encode character '\ud800' in position 0: surrogates not allowed
    if i % 128 == 0:
      f.write(b'\n') # write a line break every 128 characters to allow text editors to parse the file more easily
    if i % 1024 == 0:
      f.write(b'\n') # write a line break every 1024 characters to allow humans to visually parse the text more easily

(+2)

https://github.com/timchen214/ttf_to_txt

I also upload a program to do this kind of job,for those not familiar with Python.

moved this topic to Unity