xdanaux / fontawesome-latex

LaTeX mappings for Font Awesome, the icons font
307 stars 36 forks source link

how to create the mapping? #21

Open tessus opened 6 years ago

tessus commented 6 years ago

I can't figure out where the keys in the pdftex mapping are coming from: e.g.:

"_620" : "percent", #f295

The percent symbol/icon is unicode point f295, but what has _620 to do with that?

zauguin commented 6 years ago

Inside the OTF font file, every glyph has a name. In FontAwesome 4 these names are highly inconsistant. Sometimes they are the real icon names with - replaced by _ like fighter_jet, sometimes the names are derived from the Unicode codepoint like uniF2A0 (phone-volume) and some names are derived form the slot number in the font file: _620 is the 620th icon defined in the file.

tessus commented 6 years ago

@zauguin thanks a lot for the answer. I guess in this case I will have to look at the otf file for ForkAwesome and adjust the mapping accordingly.

/ref https://github.com/ForkAwesome/Fork-Awesome/issues/54

zauguin commented 6 years ago

@tessus I do not think this is really necessary for ForkAwesome, their icon names are much more regular and you can just parse the YAML file to create the necessary macros.

tessus commented 6 years ago

@zauguin good to know. this shouldn't be too hard then. cheers.