How to "merge" two fontello font files? - fontello

I'm making changes to an existing project that uses fontello.
And I would like to add some icons to the project's font file.
What is the easiest way to to add those new icons? Can I create a 2nd font file in fontello and then somehow merge the two font files?

When you download a Fontello pack it includes a config.json file, which is a mapping of the characters included in your custom font. If you want to add more characters to your font, you should start by uploading this config file to fontello.com, change your selected characters and then download a new pack, making sure to replace all the fonts and css files (so that the new characters start working) and this config file (for next time you want to change the set of characters included).

You can merge fontello collections using a text editor by opening the config.json file of one collection and copying the glyphs to the config.json file of the other collection. After you do that, drag (upload) the new merged config.json file to fontello.com and you can then download your new merged collection.
To add new icons, simply drag (upload) the SVG images to fontello.com. In this case you may need fix the paths (fontello will only accept files with a single path) within your SVG files before uploading them. You can do this a free tool called Inkscape by following these steps:
Open file
Select all
Object -> Ungroup
Path -> Union
Path -> Combine
File -> Vacuum Defs
Save as -> Plain SVG
If the SVG file has multiple paths that you cannot remove by combining paths, you can use Edit > XMP Editor to remove them. You should only have one path when you are done.
You can also check the svg file output in a text editor. If saved correctly, you should see a single element and an empty element.

just drag and drop your svg font to fontello home page. your previous font will be displayed. you can add additional fonts to them and download new font files.

Related

ZipForge: how to add Empty folder to archive?

Question in the title.
I didn't manage to find a way to add an empty folder to the archive or create an empty directory inside of the archive.
It works fine if I just add files and folders by mask, but I have to add files one by one and not all together (there are reasons).
How can I create an empty directory inside archive?
I've found a way to create empty folder more correctly.
As David Heffernan stated, we should add empty file titled as our folder:
FullFolderName = 'foo\bar'
ZipForge.AddFromBuffer(FullFolderName, nil^, 0);
Note: bar is our empty folder which should be in the foo folder. Do not put backslash at the end of the path.
And after that we should change the attribute of the "folder" inside the archive, because our "folder" has the same attribute as a file. To do this we should call:
ZipForge.ChangeFilesAttr(FullFolderName, ZFDirectoryAttr);
ZFDirectoryAttr is a constant declared in ZipForge.pas and equals to 16.
ZIP files do not explicitly support the concept of folders. Instead you specify file names with path separators, and ZIP file tools infer the intended structure that way.
So the way you fake an empty folder is to create an empty file with a name that ends in a trailing path separator.
I don't know ZipForge, but in the built in TZipFile you'd do it like this:
ZipFile := TZipFile.Create;
try
ZipFile.Open('C:\desktop\temp.zip', zmWrite);
ZipFile.Add(TBytes(nil), 'foo/');
finally
ZipFile.Free;
end;

Add translation using PoEditor

I have files named en_US.po, ru_RU.po etc.
Editing *.po files in PoEdit is very useful, but not while adding new strings manually.
How can I easily add new translation strings which are not automatically detected by PoEdit?
You can edit *.po files in any text editor and then in POEdit generate *.mo file
You misunderstand how gettext translations work. Source strings for translation are extracted from source code. It doesn't make sense to add them manually — they would never be used if they didn't have corresponding source code that uses them.
So the way to add strings is to use xgettext or Poedit's update from sources functionality.
P.S. The name's Poedit, not PoEditor.
You can configure your project (*.po file) opened in PoEdit. If you will done that correct PoEdit automatically update what to translate in this opened *.po file.
First of all, open *.po file which you want update with strings to
translate.
Go to Catalog -> Properties then to Source Paths tab
Add paths where PoEdit should look for source files in Your applilcation. More universal is to use relative to opened *.po file main path. If you have typical zf2 skeleton application folder structure you can add ../../.. for main path and add one module path.
Then go to Source of keywords tab and add translate and if you're using zf2 forms it is useful to add addLabel keyword (PoEdit will scan sources for this functions and add string parameters from them to your *.po file, as string to translate)
Next open Edit -> Preferences and in Processing programs tab, edit PHP section and add *.phtml extension (this will be scanned by poedit also)
After that you have to click in Update button and PoEdit will start scan your sources for strings to translate. Then you only have to do is translate found strings.

how to add file extension in adobe-brackets editor ?

I am using files with .html.eco extension in my web project and I am trying to edit in Adobe Brackets but I can't specify that it should treat this as HTML file, to provide the typical features of editing html file (like color support, grammar, etc.).
In fact I noticed that this is possible when changing languages.json file, however I am using the binary version and I didn't build from source.
https://github.com/adobe/brackets/blob/master/src/language/languages.json
Any help ?
Update: this is now much easier to do:
Open the .html.eco file
In the status bar (lower-right), click the dropdown that says "Text"
Select the "HTML" option
Open the dropdown again and select the "Set as Default" option at the top
Original answer:
There's a backlog item for making this easily configurable (please upvote!), but in the meantime you can do it by writing a very simple Brackets extension:
define(function (require, exports, module) {
var LanguageManager = brackets.getModule("language/LanguageManager");
var language = LanguageManager.getLanguage("html");
language.addFileExtension("html.eco");
});
Put this code in a file named main.js
In Brackets, go to Help > Show Extensions Folder
Create a new folder under user, and place the main.js file inside it
Restart Brackets
Here's more info on writing Brackets extensions, if you're curious.
The approach referenced using the status bar menu does not persist across sessions. An option to persist settings across all projects and all sessions is easily accomplished by editing the preferences file (accessible through the Debug menu) and associating the file extension to the desired language.
Debug -> Open Preferences File
{
"language.fileExtensions": {
"html.eco": "html"
}
}

Adding a Custom Font (Lexia)

i am trying to add Font Lexia into my project but its not working. what i did was;
i downloaded .ttf files from here: http://www.dafont.com/lexia.font
dragged two LEXIA___.ttf and LEXIB___.tff files into the project and added them to the target as well (i even tried copying them into Bundle Resources)
then i added them in plist file but of no use. (i tried using different names but didnt work)
i tried to get names in the code but its not appearing there
NSArray *arrFonts = [UIFont familyNames];
NSLog(#"name = %#",arrFonts);
The ttf files need to be added to the Resources section of your project. Then the names you put in the Info.plist file (your Marsden-Info.plist) needs to match the filenames of the ttf files.
You entered Lexia-Regular.ttf and Lexia-Bold.ttf but the files appear to be named LEXIA___.ttf and LEXIB___.ttf. The names must match exactly, including case.

How to make UILabel contents non localizible when genetating string via ibtool?

I have some labels on my xib. Some of them are not need to be localized. When i generate strings file via ibtool all labels content included in result file.
How can i exclude some UI objects in IB from localization when generate strings?
Unfortunately there is no way to annotate the content of your nib/xib files so that ibtool's --export-strings-file command ignores certain strings.
You could instead opt to use the --export-xliff option and then edit the XLIFF file to lock segments that must not be translated (attribute translate="no") before sending them out to be localized in all your languages. That's probably only worth doing if the localizers use a XLIFF-compatible CAT tool though.

Resources