Skip to content

Commit

Permalink
Cleanup start.c, re-introduce some 20120731-b variables and function.
Browse files Browse the repository at this point in the history
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
JoesCat committed Mar 31, 2013
1 parent efed7d5 commit c073fb4
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 15 deletions.
2 changes: 1 addition & 1 deletion fontforge/Makefile.am
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -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 \ ttfspecial.c ufo.c unicoderange.c utils.c winfonts.c zapfnomen.c \
groups.c langfreq.c ftdelta.c autowidth2.c woff.c stamp.c \ groups.c langfreq.c ftdelta.c autowidth2.c woff.c stamp.c \
activeinui.c pluginloading.c is_LIGATURE.c flaglist.c strlist.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 nodist_libfontforge_la_SOURCES = libstamp.c
EXTRA_libfontforge_la_SOURCES = splinerefigure.c EXTRA_libfontforge_la_SOURCES = splinerefigure.c


Expand Down
8 changes: 8 additions & 0 deletions fontforge/fontforge.h
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -47,6 +47,14 @@ extern void CheckIsScript(int argc, char *argv[]);
extern char *AdobeStandardEncoding[256]; extern char *AdobeStandardEncoding[256];
extern int32 unicode_from_adobestd[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_font_size;
extern int default_fv_antialias; extern int default_fv_antialias;
extern int default_fv_bbsized; extern int default_fv_bbsized;
Expand Down
4 changes: 4 additions & 0 deletions fontforge/splinefont.h
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -2766,6 +2766,10 @@ extern char **NamesReadMacBinary(char *filename);
extern void SFSetOrder(SplineFont *sf,int order2); extern void SFSetOrder(SplineFont *sf,int order2);
extern int SFFindOrder(SplineFont *sf); 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 const char *UnicodeRange(int unienc);
extern SplineChar *SCBuildDummy(SplineChar *dummy,SplineFont *sf,EncMap *map,int i); extern SplineChar *SCBuildDummy(SplineChar *dummy,SplineFont *sf,EncMap *map,int i);
extern SplineChar *SFMakeChar(SplineFont *sf,EncMap *map,int i); extern SplineChar *SFMakeChar(SplineFont *sf,EncMap *map,int i);
Expand Down
15 changes: 1 addition & 14 deletions fontforge/start.c
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@
*/ */
#include "fontforgevw.h" #include "fontforgevw.h"
#include "pluginloading.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 <gfile.h>
#include <time.h> #include <time.h>
#include <sys/time.h> #include <sys/time.h>
Expand Down Expand Up @@ -108,16 +104,7 @@ void InitSimpleStuff(void) {
else if ( *localeinfo.decimal_point!='.' ) coord_sep=" "; else if ( *localeinfo.decimal_point!='.' ) coord_sep=" ";
if ( getenv("FF_SCRIPT_IN_LATIN1") ) use_utf8_in_script=false; if ( getenv("FF_SCRIPT_IN_LATIN1") ) use_utf8_in_script=false;


#ifndef _NO_LIBUNICODENAMES inituninameannot(); /* Note: unicodenames done after locales set */
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


SetDefaults(); SetDefaults();
} }
Expand Down

0 comments on commit c073fb4

Please sign in to comment.