Loading font with more than 127 Chars
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- zorg
- Party member
- Posts: 3468
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
- Contact:
Re: Loading font with more than 127 Chars
I mean, some games simply separate the "username" and "displayname", and only allow a restricted set like ascii or even just a-zA-Z0-9_ in usernames; that way you don't even have to cheat like that to have multiple Ben-s in the game...
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Re: Loading font with more than 127 Chars
There isn't anything wrong with having multiple characters with same apparent name or even username. It only has to be different bit-wise.
Re: Loading font with more than 127 Chars
But in games with search functionality latins B Town will be burned more often because people that seeks revenge against greek and cyrilic B Ben will fight latin B Ben.
But here is an list
http://www.unicode.org/Public/security/ ... sables.txt
But here is an list
http://www.unicode.org/Public/security/ ... sables.txt
Re: Loading font with more than 127 Chars
BTW, lowercase Cyrillic В looks like this: в which is different than the Latin lowercase b.
In Cyrillic you can't write lowercase В as b...
depending on your font, b may look similar to the Cyrillic Ь or Ъ which are different letters altogether.
So it's not a good idea use these interchangeably despite how similar the uppercase versions may appear.
In Cyrillic you can't write lowercase В as b...
depending on your font, b may look similar to the Cyrillic Ь or Ъ which are different letters altogether.
So it's not a good idea use these interchangeably despite how similar the uppercase versions may appear.
Re: Loading font with more than 127 Chars
Classic XY problem here.
If OP wants to just load a font they found and doesn't care about the extra characters, they should remove the excess characters from the image and load up the range of characters they need, bearing in mind the heavy complication with loading any character above 127.
If OP wants to make an old DOS like game, they should not use love.graphics.print for this, should use Quads and love.graphics.draw, and write their own string drawing algo. It's not very hard, though it has its pros and cons.
If OP actually wants multilingual characters, the image font it a poor choice, and they should look into a proper TTF font.
If OP wants to just load a font they found and doesn't care about the extra characters, they should remove the excess characters from the image and load up the range of characters they need, bearing in mind the heavy complication with loading any character above 127.
If OP wants to make an old DOS like game, they should not use love.graphics.print for this, should use Quads and love.graphics.draw, and write their own string drawing algo. It's not very hard, though it has its pros and cons.
If OP actually wants multilingual characters, the image font it a poor choice, and they should look into a proper TTF font.
Re: Loading font with more than 127 Chars
I'm making a ComputerCraft Emulator, so I must load the CC Font. The most is working now, but some CC programs need Chars who are higher than 127. You can find the current source code here: https://github.com/Wilma456/CCLite.
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Loading font with more than 127 Chars
But that's not valid UTF-8. You can convert it to utf-8 by loading the utf8 library (require "utf8") and then using utf8.char, like string.char. That probably means you need to replace those values in input strings too, though.
Who is online
Users browsing this forum: Google [Bot] and 9 guests