FontAwesome UTF-8 Dictionary for Love2D usage

Showcase your libraries, tools and other projects that help your fellow love users.
Post Reply
User avatar
Pyuu
Prole
Posts: 22
Joined: Mon Jul 11, 2016 1:19 am

FontAwesome UTF-8 Dictionary for Love2D usage

Post by Pyuu »

As the title says, I just went and typed out, for 8 hours, a dictionary for Font Awesome v4.7 containing all of the terms and the corresponding UTF-8 encoding string in hexadecimal.

Here is a link to the dictionary: https://raw.githubusercontent.com/PyuuC ... 20UTF8.txt
An example on how to use this is included in the attachment provided:
FA-Test.love
(104.1 KiB) Downloaded 176 times
Here is a screenshot of it running properly:
https://love2d.org/imgmirrur/9qJVhx7.png

Just thought I'd share :P
User avatar
s-ol
Party member
Posts: 1077
Joined: Mon Sep 15, 2014 7:41 pm
Location: Cologne, Germany
Contact:

Re: FontAwesome UTF-8 Dictionary for Love2D usage

Post by s-ol »

Pyuu wrote:As the title says, I just went and typed out, for 8 hours, a dictionary for Font Awesome v4.7 containing all of the terms and the corresponding UTF-8 encoding string in hexadecimal.

Here is a link to the dictionary: https://raw.githubusercontent.com/PyuuC ... 20UTF8.txt
An example on how to use this is included in the attachment provided:
FA-Test.love
Here is a screenshot of it running properly:
https://love2d.org/imgmirrur/9qJVhx7.png

Just thought I'd share :P
wow.... nice job, but next time I think you should use a some regex replace rules or write a little program to convert for example this list of variables from the fontawesome source into your format.

For example a replace of \$fa-var-([\w-]+): "\\([0-9a-f]{4})"; with \1:E\2 in JS regex would've created the list for you from the file I linked: https://regex101.com/r/3yWS8L/1

s-ol.nu /blog  -  p.s-ol.be /st8.lua  -  g.s-ol.be /gtglg /curcur

Code: Select all

print( type(love) )
if false then
  baby:hurt(me)
end
User avatar
Pyuu
Prole
Posts: 22
Joined: Mon Jul 11, 2016 1:19 am

Re: FontAwesome UTF-8 Dictionary for Love2D usage

Post by Pyuu »

Thanks. But personally I don't like using regex :P
I'm not sure if there is a way in lua to convert the \ff00 variables into UTF-8 format.
User avatar
Positive07
Party member
Posts: 1014
Joined: Sun Aug 12, 2012 4:34 pm
Location: Argentina

Re: FontAwesome UTF-8 Dictionary for Love2D usage

Post by Positive07 »

I use a combination of Lua patterns and the utf8 library included with LÖVE plus Ser to serialize that for the Material-Love icon font
for i, person in ipairs(everybody) do
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests