Closed scottnc27603 closed 9 years ago
You could do this with a free font editor and modify the ttf files. Then go to "https://everythingfonts.com/ttf-to-woff" and generate the woff files. We're at the point right now where we're just addressing bugs and aren't looking to add new features. Is this a large number of symbols or just a handful?
Also, to make a change like this, The MilStd or USAS would have to be updated first. This wouldn't be something I could just do even if we were doing new features. But what you do with the font files in your organization is up to you.
There are some legacy symbols still in the renderer that support religious distinctions: Church: OSD----- Mosque: OSE----- Synagogue: OSF-----***** But those codes may not work with other systems as they're not part of the USAS or MilStd.
Thanks for the quick reply. I'll get a list of the symbols this afternoon, and post them here.
There are 84, or 21 if you take out the affiliation. How do I find the cross in the font file?
Scott
SHGPUSMV-- SHGPUSMVT- SHGPUSMVC- SHGPUSMT SHGPUSMPT SHGPUSMPC SHGPUSMP SHGPUSMMT SHGPUSMMC SHGPUSMM SHGPUSMDT SHGPUSMDC SHGPUSMD SHGPUSMC SUGPUSMVT SUGPUSMVC SUGPUSMV SUGPUSMT SUGPUSMPT SUGPUSMPC SUGPUSMP SUGPUSMDT SUGPUSMDC SUGPUSMD SUGPUSMC SNGPUSMVT SNGPUSMVC SNGPUSMV SNGPUSMT SNGPUSMC SNGPUSMPT SNGPUSMPC SNGPUSMP SNGPUSMMT SNGPUSMMC SNGPUSMM SNGPUSMDT SNGPUSMDC SNGPUSMD SNGPUCVRUE SFGPUCVRUE SHGPUCVRUE SUGPUCVRUE SFGPUSMVC SFGPUSMV SFGPUSMVT SFGPUSMDT SFGPUSMDC SFGPUSMD SFGPUSMPT SFGPUSMPC SFGPUSMP SFGPUSMT SFGPUSMC SFGPUSMMT SFGPUSMMC SFGPUSMM SFGPUSM SNGPUSM SHGPUSM SUGPUSM SUGPUSMM SUGPUSMMC SUGPUSMMT SFGPUSAM SUGPUSAM SNGPUSAM SHGPUSAM SFGPUSAMT SUGPUSAMT SNGPUSAMT SHGPUSAMT SFGPUSAMC SUGPUSAMC SNGPUSAMC SHGPUSAMC SFGPIXH---H SUGPIXH---H SNGPIXH---H SHGPIXH---H SFGPIX----H SUGPIX----H SNGPIX----H SHGPIX----H
Before I get into details, I want to give you a heads up that if your customer is a branch of the US military, you'll need to get some kind of exception for these symbols. Which shouldn't be a problem if the customer directed you to make these changes. Otherwise you'll probably get called out for bad symbols at any test event your program goes through due to them not matching the Military Standard 2525 document.
With that said, you want the UnitFont.ttf file under in the fonts folder: https://github.com/missioncommand/mil-sym-js/tree/master/web/js/src/fonts
Then you want to find where in the font file those symbols are. So, for example, you'll take "SHGPIX----H----", take the first ten characters and drop the status and affiliation which will give you "S_G_IX----". Search for that code in UnitFontMappingC.js. In this example, the relevant character indexes are 660, 661, 662 and 663. Depending what font editor you use, you may have to change those to hex values to find them in the font file. Those are the characters you'd want to edit for that symbol. In some cases the index values are all the same and you'd only have to change the one character. After you've made all your alterations, you just save the font file, and generate a woff and woff2 file at "https://everythingfonts.com". You'll need to make a free account with the site to do conversions with a font file the size of UnitFont.ttf.
Also, please update the meta data in the font file to indicate it's modified, a product of your team and not one that we put out. This can be done in the font editor.
Let me know if you have any other questions.
I'm going to use this lib for a project and one of the project leads brought the following to my attention.
"Muslim countries take offense to Christian crosses, so all of the 2525 symbols that have a cross on them (medical, chaplain…) need to have a crescent moon symbol on them, just google red crescent and you will see what the symbol needs to look like (basically the red cross organizations name when operating in Muslim countries.)"
Is there a way to do this? If not, should I add the code for this an submit a PR?
Thoughts?
Thanks, Scott