The Birdfont Source Code


All Repositories / birdfont.git / commitdiff – RSS feed

Fix export bug

These changes was commited to the Birdfont repository Fri, 26 Jun 2015 08:55:34 +0000.

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git
[Fri, 26 Jun 2015 08:55:34 +0000]

Updated Files

libbirdfont/ExportTool.vala
libbirdfont/MenuTab.vala
--- a/libbirdfont/ExportTool.vala +++ b/libbirdfont/ExportTool.vala @@ -394,10 +394,20 @@ File ttf_file_mac; File eot_file; bool done = true; + string ttf_name; + string ttf_name_mac; try { - ttf_file = get_child (folder, ExportSettings.get_file_name (current_font) + ".ttf"); - ttf_file_mac = get_child (folder, ExportSettings.get_file_name_mac (current_font) + ".ttf"); + ttf_name = ExportSettings.get_file_name (current_font) + ".ttf"; + ttf_name_mac = ExportSettings.get_file_name_mac (current_font) + ".ttf"; + + if (ttf_name == ttf_name_mac) { + warning ("Same file name for the two ttf files."); + ttf_name_mac = ExportSettings.get_file_name_mac (current_font) + " Mac.ttf"; + } + + ttf_file = get_child (folder, ttf_name); + ttf_file_mac = get_child (folder, ttf_name_mac); eot_file = get_child (folder, ExportSettings.get_file_name (current_font) + ".eot"); printd (@"Writing TTF fonts to $((!) ttf_file.get_path ())\n");
--- a/libbirdfont/MenuTab.vala +++ b/libbirdfont/MenuTab.vala @@ -105,6 +105,15 @@ return false; } + string ttf_name = ExportSettings.get_file_name (current_font) + ".ttf"; + string ttf_name_mac = ExportSettings.get_file_name_mac (current_font) + ".ttf"; + + if (ttf_name == ttf_name_mac) { + warning ("You need to choose a different name for the TTF file with Mac adjustmets."); + ttf_name_mac = ExportSettings.get_file_name_mac (current_font) + " Mac.ttf"; + return false; + } + return true; }