Closed sunaku closed 8 years ago
I can't reproduce your problem, but get font files attached. Please check this. TamzenForPowerline.zip It seems correct font files for me.
I have compiled bdf2ttf by MSVC10's 32bit compiler on WIndows 10, converted and checked result TTF files on same machine.
Thanks! :+1: Your generated fonts worked successfully in Linux FontForge and Windows 7. :100:
I should have mentioned that I compiled and ran bdf2ttf under Linux, using make gcc
target.
So there appears to be some functional difference between the results of MSVC and GCC. :bug:
For your reference, here is my GCC information and compilation output:
$ gcc --version
gcc (GCC) 4.9.3
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ make gcc-clean
make -f compile/Make_gcc.mak clean
make[1]: Entering directory '/home/sunny/lab/bdf2ttf'
rm -f ./src/bdf.o ./src/bdf2ttf.o ./src/main.o ./src/rcfile.o ./src/table.o ./src/ucsconv.o
make[1]: Leaving directory '/home/sunny/lab/bdf2ttf'
$ make gcc
make -f compile/Make_gcc.mak
make[1]: Entering directory '/home/sunny/lab/bdf2ttf'
cc -c -o src/bdf.o src/bdf.c
g++ -c -o src/bdf2ttf.o src/bdf2ttf.cpp
src/bdf2ttf.cpp:71:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
};
^
src/bdf2ttf.cpp:71:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
src/bdf2ttf.cpp:71:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
src/bdf2ttf.cpp:71:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
src/bdf2ttf.cpp:71:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
src/bdf2ttf.cpp:71:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
src/bdf2ttf.cpp:71:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
src/bdf2ttf.cpp:71:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
src/bdf2ttf.cpp:71:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
src/bdf2ttf.cpp:71:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
src/bdf2ttf.cpp:71:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
src/bdf2ttf.cpp:71:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
src/bdf2ttf.cpp:71:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
src/bdf2ttf.cpp:71:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
src/bdf2ttf.cpp:71:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
src/bdf2ttf.cpp:71:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
src/bdf2ttf.cpp:71:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
src/bdf2ttf.cpp:71:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
src/bdf2ttf.cpp:71:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
src/bdf2ttf.cpp:90:30: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
static char* STYLE_REGULAR = "Regular";
^
src/bdf2ttf.cpp:91:28: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
static char* STYLE_BOLD = "Bold";
^
src/bdf2ttf.cpp:92:29: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
static char* STYLE_ITALIC = "Italic";
^
src/bdf2ttf.cpp:93:33: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
static char* STYLE_BOLDITALIC = "Bold Italic";
^
In file included from src/bdf2ttf.cpp:11:0:
src/version.h:12:19: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
#define COPYRIGHT "(C) 2003 KaoriYa";
^
src/bdf2ttf.cpp:95:21: note: in expansion of macro 'COPYRIGHT'
char *g_copyright = COPYRIGHT;
^
src/version.h:13:18: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
#define VERSION "2.0"
^
src/bdf2ttf.cpp:100:20: note: in expansion of macro 'VERSION'
char *g_version = VERSION;
^
src/version.h:14:19: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
#define TRADEMARK "KaoriYa"
^
src/bdf2ttf.cpp:102:21: note: in expansion of macro 'TRADEMARK'
char *g_trademark = TRADEMARK;
^
src/bdf2ttf.cpp: In function 'void generate_OS2_PREP(bdf2_t*)':
src/bdf2ttf.cpp:831:35: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
os2->array::addString(VENDORID); // achVendID
^
cc -c -o src/main.o src/main.c
cc -c -o src/rcfile.o src/rcfile.c
g++ -c -o src/table.o src/table.cpp
cc -c -o src/ucsconv.o src/ucsconv.c
g++ -o bdf2ttf src/bdf.o src/bdf2ttf.o src/main.o src/rcfile.o src/table.o src/ucsconv.o
make[1]: Leaving directory '/home/sunny/lab/bdf2ttf'
There seems be bad assumption of bdf2ttf.
bdf2ttf consider unsigned long
is 32bit. But most of gcc treat it as 64bit.
It will cause some problems.
It would be better that use size aware types uint32_t
or so.
But I don't have time to do that.
I have fixed for gcc.
@sunaku please try again with recent version.
Thanks @koron! :bow: I tried the fix but the problem still occurs. :disappointed: I will try to debug it further. :construction_worker:
I tried rebuilding bdf2ttf for 32-bit architecture (my system is 64-bit):
$ make gcc CFLAGS=-m32 LDFLAGS=-m32
make -f compile/Make_gcc.mak
make[1]: Entering directory '/home/sunny/lab/bdf2ttf'
cc -m32 -c -o src/bdf.o src/bdf.c
g++ -m32 -c -o src/bdf2ttf.o src/bdf2ttf.cpp
cc -m32 -c -o src/main.o src/main.c
cc -m32 -c -o src/rcfile.o src/rcfile.c
g++ -m32 -c -o src/table.o src/table.cpp
cc -m32 -c -o src/ucsconv.o src/ucsconv.c
g++ -o bdf2ttf src/bdf.o src/bdf2ttf.o src/main.o src/rcfile.o src/table.o src/ucsconv.o -m32
make[1]: Leaving directory '/home/sunny/lab/bdf2ttf'
I still get the "Postscript font name" error in FontForge :disappointed: but at least the embedded bitmap fonts appear correctly now :relieved: (previously FontForge rendered them as empty, red boxes). :construction_worker: Next idea...
I still get the "Postscript font name" error in FontForge
I won'f fix about this. Because it is not in bdf2ttf's scope. But welcome to receive patches.
:sweat_smile: Fair enough, thanks for your help! :bow:
Hello,
I tried using bdf2ttf to transform the Tamzen font into TTF, but when I double-click on the resulting TTF file under Windows 7, an error dialog appears saying "Windows Font Viewer: The requested file ... is not a valid font file.". Similarly, I'm getting an error message when opening the resulting TTF file in FontForge under Linux: :disappointed:
In the above screenshot, that "|0003|" Unicode glyph at the end of the font name is suspicious. :suspect:
Steps to reproduce the bug
Thanks for your consideration. :sweat_smile: