Permalink
Browse files

Cleanup start.c, re-introduce some 20120731-b variables and function.

If any other non-FontForge programs exist which are still using
unicode_nameannot or calling inituninameannot(), then these are available
for those programs to use again.
  • Loading branch information...
1 parent efed7d5 commit c073fb4bc724e9594fa910257e5bf67afad26e32 @JoesCat JoesCat committed Mar 31, 2013
Showing with 14 additions and 15 deletions.
  1. +1 −1 fontforge/Makefile.am
  2. +8 −0 fontforge/fontforge.h
  3. +4 −0 fontforge/splinefont.h
  4. +1 −14 fontforge/start.c
View
@@ -116,7 +116,7 @@ libfontforge_la_SOURCES = asmfpst.c autohint.c autosave.c autotrace.c \
ttfspecial.c ufo.c unicoderange.c utils.c winfonts.c zapfnomen.c \
groups.c langfreq.c ftdelta.c autowidth2.c woff.c stamp.c \
activeinui.c pluginloading.c is_LIGATURE.c flaglist.c strlist.c \
- collabclient.c collabclient.h
+ collabclient.c collabclient.h unicodelibinfo.c
nodist_libfontforge_la_SOURCES = libstamp.c
EXTRA_libfontforge_la_SOURCES = splinerefigure.c
View
@@ -47,6 +47,14 @@ extern void CheckIsScript(int argc, char *argv[]);
extern char *AdobeStandardEncoding[256];
extern int32 unicode_from_adobestd[256];
+/* unicode_nameannot - Deprecated, but kept for older programs to access. */
+#if _NO_LIBUNINAMESLIST
+struct unicode_nameannot {
+ const char *name, *annot;
+};
+#endif
+extern const struct unicode_nameannot * const *const *_UnicodeNameAnnot;
+
extern int default_fv_font_size;
extern int default_fv_antialias;
extern int default_fv_bbsized;
View
@@ -2766,6 +2766,10 @@ extern char **NamesReadMacBinary(char *filename);
extern void SFSetOrder(SplineFont *sf,int order2);
extern int SFFindOrder(SplineFont *sf);
+extern void inituninameannot(void);
+extern char *unicode_name(int32 unienc);
+extern char *unicode_annot(int32 unienc);
+
extern const char *UnicodeRange(int unienc);
extern SplineChar *SCBuildDummy(SplineChar *dummy,SplineFont *sf,EncMap *map,int i);
extern SplineChar *SFMakeChar(SplineFont *sf,EncMap *map,int i);
View
@@ -26,10 +26,6 @@
*/
#include "fontforgevw.h"
#include "pluginloading.h"
-#ifndef _NO_LIBUNICODENAMES
-#include <libunicodenames.h>
-uninm_names_db names_db; /* Unicode character names and annotations database */
-#endif
#include <gfile.h>
#include <time.h>
#include <sys/time.h>
@@ -108,16 +104,7 @@ void InitSimpleStuff(void) {
else if ( *localeinfo.decimal_point!='.' ) coord_sep=" ";
if ( getenv("FF_SCRIPT_IN_LATIN1") ) use_utf8_in_script=false;
-#ifndef _NO_LIBUNICODENAMES
- char *names_db_file;
-
- /* Load character names and annotations that come from the Unicode NamesList.txt */
- /* This should not be done until after the locale has been set. */
- names_db_file = uninm_find_names_db(NULL);
- names_db = (names_db_file == NULL) ? ((uninm_names_db) 0) : uninm_names_db_open(names_db_file);
- free(names_db_file);
- /* NOTE: you need to do uninm_names_db_close(names_db); when you exit program */
-#endif
+ inituninameannot(); /* Note: unicodenames done after locales set */
SetDefaults();
}

0 comments on commit c073fb4

Please sign in to comment.