Closed GoogleCodeExporter closed 9 years ago
Hi Wojcieh,
Thanks a lot for he code review. I tried to modify sources according to your
comment (only gl-3.0 since it will be the main branch soon) but the part on
the various path remains quite a mystery to me because I do not masterize CMake
at all. Did you manage to fix the Cmakefile by any chance ?
Concerning the subpixel demo, it depends mainly if you compiled freetype with
subpixel support or not. You have to check for
FT_CONFIG_OPTION_SUBPIXEL_RENDERING in freetype2/freetype/ftconfig/ftoption.h
Nicolas
Original comment by Nicolas.Rougier@gmail.com
on 4 Feb 2013 at 1:56
I can try to fix CMake errors.
I compiled latest freetype version (2.4.11) with subpixel support on. In my own
projects subpixel does work nicely.
Original comment by wmam...@gmail.com
on 4 Feb 2013 at 2:14
That would be great !
Original comment by Nicolas.Rougier@gmail.com
on 4 Feb 2013 at 2:19
I applied a patch for fixing C89 / visual C++. Hopefully it will fix these
problems as well.
It's in the gl-3.0 branch.
Original comment by Nicolas.Rougier@gmail.com
on 20 Feb 2013 at 10:54
[deleted comment]
Sorry for the long delay.
I haven't encountered any CMake errors with current trunk version. Good job.
In case something is unclear in the following message, write.
There are few compilation/linking errors (Visual C++ 10):
[1]
freetype-gl\platform.c(42): error C2371: 'round' : redefinition; different
basic types
freetype-gl\platform.h(61) : see declaration of 'round'
solution: change return type to double.
[2]
in file freetype-gl\demo-cube.c change #include <GL/glut.h> to #include <glut.h>
[3]
there are (literally) thousands of warnings:
warning C4309 : 'initializing' : truncation of constant value
and
warning C4305: 'initializing' : truncation from 'double' to 'float'
in freetype-gl\arial-16.h
The latter can be solved by adding constant literal f at the end of each
floating point number (not manually, in generator) or changing type to double,
and the former by changing char tex_data[16384]; to unsigned char
tex_data[16384]; in freetype-gl\arial-16.h(61).
[4]
There is a linkage error:
error LNK2005: _font already defined in demo-makefont.obj
This is caused by tentative definitions being absent in C++. It can be solved
by moving initialization of `texture_font_t font` into (new) arial-16.c file
and adding extern in front of this declaration.
Except that, I am getting quite significant number of other warnings (mostly
related to conversions and warning LNK4098: defaultlib 'LIBCMT' conflicts with
use of other libs; use /NODEFAULTLIB:library), but let me focus on them later
on :)
regards
Original comment by wmam...@gmail.com
on 2 Apr 2013 at 11:33
LIBCMT warning disappered when I linked against correct freetype lib.
Original comment by wmam...@gmail.com
on 2 Apr 2013 at 12:00
I'm reopening this issue since I did not fix [4]. Do you mean it's necessary to
split the output (arial-16.h) into two separate files, arial-16.c starting at
texture_font_t font = { 128, 128, 1, ... ?
Original comment by Nicolas.Rougier@gmail.com
on 9 Apr 2013 at 5:41
no, wait, leave it as is, I need to investigate it more deeply. It is something
much more strange.
Original comment by wmam...@gmail.com
on 9 Apr 2013 at 8:52
Got it, file `arial-16.h` has incorrect `Item type` - `C/C++ compiler` instead
of `C/C++ header`.
BTW, is there any reason to wrap entire arial-16 withextern C?
Original comment by wmam...@gmail.com
on 9 Apr 2013 at 9:48
I do not remember the reason indeed.
Should I close the issue ?
Original comment by Nicolas.Rougier@gmail.com
on 2 May 2013 at 9:55
If item types is fixed, then yes :)
Original comment by wmam...@gmail.com
on 2 May 2013 at 10:53
Hi There.It is already my second attempt to compile your lib with VS2010.I am
getting all sort of errors in demo-font.c Like symtax error which are not
really exist.I set the compiler to be C instead of CPP and still the same.Is
this project compatible with VS and C++ compilers? If yes ,can you briefly
explain how do get it work?Thanks a lot.
Original comment by explomas...@gmail.com
on 2 May 2013 at 3:54
In fact I almost got it compiled.In demo-ansi.c this block :
markup_t markup = {
.family = "fonts/VeraMono.ttf",
.size = 15.0, .bold = 0, .italic = 0,
.rise = 0.0, .spacing = 0.0, .gamma = 1.0,
.foreground_color = black, .background_color = none,
.underline = 0, .underline_color = black,
.overline = 0, .overline_color = black,
.strikethrough = 0, .strikethrough_color = black,
.font = 0,
};
Throws syntax error.If I comment it out the project compiles.How can I adjust
this block for VS2010?
Original comment by explomas...@gmail.com
on 2 May 2013 at 4:17
@Nicolas:
change line #133 in CMakeLists.txt to DEMO( demo-make
"demo-makefont.c" )
@14: update to the latest revision.
Original comment by wmam...@gmail.com
on 3 May 2013 at 3:11
Hey!! Thanks for help.Now it compiles and runs.But it exist here:
fprintf( stderr, "\"font_manager_get_from_description\" not implemented yet.\n" );
Does it mean this example works on Linux only?
Thanks!
Original comment by explomas...@gmail.com
on 5 May 2013 at 1:47
Unfortunately, yes. I do not know how to query a specific font from its
description under windows.
You can however run the related demo by giving explicitly the font filename.
Original comment by Nicolas.Rougier@gmail.com
on 5 May 2013 at 1:55
Demo-cube.c shows empty viewport in VS2010
Original comment by explomas...@gmail.com
on 5 May 2013 at 1:57
Could you open a new issue please ?
Original comment by Nicolas.Rougier@gmail.com
on 5 May 2013 at 2:03
Yes sure.Btw , wanted to ask you.Are you going to add features like paragraph
alignment ?(Left ,Right ,Center) Would be very useful to have this calculation
done by the lib. ;)
Original comment by explomas...@gmail.com
on 5 May 2013 at 2:17
Original issue reported on code.google.com by
wmam...@gmail.com
on 28 Jan 2013 at 9:03