[ft] how to compile freetype dll on windows

2010-01-25 Thread samaram s
Hi ,Can anyone please tell me how to compile and get freetype dll and lib on
windows.
I tried downloading* ft2311.zip 10-Oct-2009 11:43 2.2M , *and compiled the
source which is in the following path,
*ft2311\freetype2\builds\win32*\*vc2005

But I am getting the following warnings!

Warning1warning C4996: 'fopen' was declared deprecated
Warning2warning C4996: 'strncpy' was declared deprecated
Warning3warning C4996: 'strcat' was declared deprecated
Warning4warning C4996: 'strcat' was declared deprecated
Warning5warning C4996: 'sprintf' was declared deprecated
Warning6warning C4996: 'sprintf' was declared deprecated
Warning7warning C4100: 'get_inflections' : unreferenced formal
parameter
Warning8warning C4018: '=' : signed/unsigned mismatch
Warning9warning C4018: '=' : signed/unsigned mismatch
Warning10warning C4018: '=' : signed/unsigned mismatch
Warning11warning C4018: '=' : signed/unsigned mismatch
Warning12warning C4244: '=' : conversion from 'FT_UInt' to
'FT_UShort', possible loss of data
Warning13warning C4244: '=' : conversion from 'FT_UInt' to
'FT_UShort', possible loss of data
Warning14warning C4244: 'function' : conversion from 'int' to
'Bool', possible loss of data
Warning15warning C4244: 'function' : conversion from 'int' to
'Bool', possible loss of data
*
*Still somemore like above.

Please let me know whatelse should i inclde to compile successfully.


Thanks
Sam
*
___
Freetype mailing list
Freetype@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype


Re: [ft] how to compile freetype dll on windows

2010-01-25 Thread Vincent Torri



On Mon, 25 Jan 2010, samaram s wrote:


Hi ,Can anyone please tell me how to compile and get freetype dll and lib on
windows.
I tried downloading* ft2311.zip 10-Oct-2009 11:43 2.2M , *and compiled the
source which is in the following path,
*ft2311\freetype2\builds\win32*\*vc2005

But I am getting the following warnings!

Warning1warning C4996: 'fopen' was declared deprecated
Warning2warning C4996: 'strncpy' was declared deprecated
Warning3warning C4996: 'strcat' was declared deprecated
Warning4warning C4996: 'strcat' was declared deprecated
Warning5warning C4996: 'sprintf' was declared deprecated
Warning6warning C4996: 'sprintf' was declared deprecated
Warning7warning C4100: 'get_inflections' : unreferenced formal
parameter
Warning8warning C4018: '=' : signed/unsigned mismatch
Warning9warning C4018: '=' : signed/unsigned mismatch
Warning10warning C4018: '=' : signed/unsigned mismatch
Warning11warning C4018: '=' : signed/unsigned mismatch
Warning12warning C4244: '=' : conversion from 'FT_UInt' to
'FT_UShort', possible loss of data
Warning13warning C4244: '=' : conversion from 'FT_UInt' to
'FT_UShort', possible loss of data
Warning14warning C4244: 'function' : conversion from 'int' to
'Bool', possible loss of data
Warning15warning C4244: 'function' : conversion from 'int' to
'Bool', possible loss of data
*
*Still somemore like above.


those are just warnings, so the dll should be built

Vincent torri



Please let me know whatelse should i inclde to compile successfully.


Thanks
Sam
*




___
Freetype mailing list
Freetype@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype


Re: [ft] how to compile freetype dll on windows

2010-01-25 Thread samaram s
Yeah i got a dll..i ignored those warnings...
But when i tried to use that dll in my sample code, I am getting the
following linker error.

Error1fatal error LNK1104: cannot open file
'freetype2311MT_D.lib'

I placed the above lib under the following path,
project-properties-Configurationproperties-Linker-Input-Additionaldependencies.

Am i right?Or should i place else where?


On Mon, Jan 25, 2010 at 11:09 AM, Vincent Torri vto...@univ-evry.fr wrote:



 On Mon, 25 Jan 2010, samaram s wrote:

  Hi ,Can anyone please tell me how to compile and get freetype dll and lib
 on
 windows.
 I tried downloading* ft2311.zip 10-Oct-2009 11:43 2.2M , *and compiled the
 source which is in the following path,
 *ft2311\freetype2\builds\win32*\*vc2005

 But I am getting the following warnings!

 Warning1warning C4996: 'fopen' was declared deprecated
 Warning2warning C4996: 'strncpy' was declared deprecated
 Warning3warning C4996: 'strcat' was declared deprecated
 Warning4warning C4996: 'strcat' was declared deprecated
 Warning5warning C4996: 'sprintf' was declared deprecated
 Warning6warning C4996: 'sprintf' was declared deprecated
 Warning7warning C4100: 'get_inflections' : unreferenced formal
 parameter
 Warning8warning C4018: '=' : signed/unsigned mismatch
 Warning9warning C4018: '=' : signed/unsigned mismatch
 Warning10warning C4018: '=' : signed/unsigned mismatch
 Warning11warning C4018: '=' : signed/unsigned mismatch
 Warning12warning C4244: '=' : conversion from 'FT_UInt' to
 'FT_UShort', possible loss of data
 Warning13warning C4244: '=' : conversion from 'FT_UInt' to
 'FT_UShort', possible loss of data
 Warning14warning C4244: 'function' : conversion from 'int' to
 'Bool', possible loss of data
 Warning15warning C4244: 'function' : conversion from 'int' to
 'Bool', possible loss of data
 *
 *Still somemore like above.


 those are just warnings, so the dll should be built

 Vincent torri


 Please let me know whatelse should i inclde to compile successfully.


 Thanks
 Sam
 *


___
Freetype mailing list
Freetype@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype


[ft] error while compiling example1 in tutorial

2010-01-25 Thread samaram s
ttftool.exe AtoZ.ttf D

FT_Stream_Open: could not open `A'

And getting the debugger attached

Could anyone please let me know What is wrong?

Thank You
Regards,
Sam
attachment: win_error.PNG___
Freetype mailing list
Freetype@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype


[ft] how to compile ftdemos

2010-01-25 Thread samaram s
Hi,
Can anybody please tell me Where can i find document regarding how to build
ftdemos project in Linux and in Windows?


Thanks
Sam
___
Freetype mailing list
Freetype@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype


Re: [ft] how to compile ftdemos

2010-01-25 Thread Werner LEMBERG

 Can anybody please tell me Where can i find document regarding how
 to build ftdemos project in Linux and in Windows?

For Linux, this is described in the README file of the freetype2-demos
bundle.


Werner


___
Freetype mailing list
Freetype@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype


Re: [ft] how to compile freetype dll on windows

2010-01-25 Thread Dave Calkins
You need to add the directory which contains the built library to the 
list of directories the linker searches.  VSOptionsProjects and 
DirectoriesLibraries.


Once the directory is added, then you can add the .lib file to the 
additional dependencies and it should find it.


On 1/25/2010 11:23 AM, samaram s wrote:

Yeah i got a dll..i ignored those warnings...
But when i tried to use that dll in my sample code, I am getting the 
following linker error.


Error1fatal error LNK1104: cannot open file 
'freetype2311MT_D.lib'


I placed the above lib under the following path,
project-properties-Configurationproperties-Linker-Input-Additionaldependencies.

Am i right?Or should i place else where?


On Mon, Jan 25, 2010 at 11:09 AM, Vincent Torri vto...@univ-evry.fr 
mailto:vto...@univ-evry.fr wrote:




On Mon, 25 Jan 2010, samaram s wrote:

Hi ,Can anyone please tell me how to compile and get freetype
dll and lib on
windows.
I tried downloading* ft2311.zip 10-Oct-2009 11:43 2.2M , *and
compiled the
source which is in the following path,
*ft2311\freetype2\builds\win32*\*vc2005

But I am getting the following warnings!

Warning1warning C4996: 'fopen' was declared deprecated
Warning2warning C4996: 'strncpy' was declared deprecated
Warning3warning C4996: 'strcat' was declared deprecated
Warning4warning C4996: 'strcat' was declared deprecated
Warning5warning C4996: 'sprintf' was declared deprecated
Warning6warning C4996: 'sprintf' was declared deprecated
Warning7warning C4100: 'get_inflections' :
unreferenced formal
parameter
Warning8warning C4018: '=' : signed/unsigned mismatch
Warning9warning C4018: '=' : signed/unsigned mismatch
Warning10warning C4018: '=' : signed/unsigned mismatch
Warning11warning C4018: '=' : signed/unsigned mismatch
Warning12warning C4244: '=' : conversion from 'FT_UInt' to
'FT_UShort', possible loss of data
Warning13warning C4244: '=' : conversion from 'FT_UInt' to
'FT_UShort', possible loss of data
Warning14warning C4244: 'function' : conversion from
'int' to
'Bool', possible loss of data
Warning15warning C4244: 'function' : conversion from
'int' to
'Bool', possible loss of data
*
*Still somemore like above.


those are just warnings, so the dll should be built

Vincent torri


Please let me know whatelse should i inclde to compile
successfully.


Thanks
Sam
*


___
Freetype mailing list
Freetype@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype


Re: [ft] how to compile ftdemos

2010-01-25 Thread Werner LEMBERG
 i gave the following command,
 r...@ubuntu:~/Downloads/ft2demos-2.3.9# make FT2DEMOS=1
 ../freetype2/Makefile

You've missed the `-f' option:

  make FT2DEMOS=1 -f ../freetype2/Makefile


Werner


___
Freetype mailing list
Freetype@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype


Re: [ft] how to compile ftdemos

2010-01-25 Thread samaram s
Thanks Werner for the quick reply.

But still i got the following error,
r...@ubuntu:~/Downloads/ft2demos-2.3.9# make FT2DEMOS=1 -f
../freetype2/Makefile
../freetype2/Makefile:32: builds/toplevel.mk: No such file or directory
make: *** No rule to make target `builds/toplevel.mk'.  Stop.

Then i gave,

make FT2DEMOS=1 -f ../freetype2/builds/freetype.mk
../freetype2/builds/freetype.mk:162: /builds/exports.mk: No such file or
directory
../freetype2/builds/freetype.mk:215: /src/base/rules.mk: No such file or
directory
make: *** No rule to make target `/src/base/rules.mk'.  Stop.

Then i tried with,
 make FT2DEMOS=1 -f ../freetype2/builds/toplevel.mk
../freetype2/builds/toplevel.mk:74: /modules.cfg: No such file or directory
../freetype2/builds/toplevel.mk:113: /builds/detect.mk: No such file or
directory
../freetype2/builds/toplevel.mk:168: /builds/modules.mk: No such file or
directory
make: *** No rule to make target `/builds/modules.mk'.  Stop.

Can you please let me know what mistake i am doing??


Thanks a lot

On Mon, Jan 25, 2010 at 2:07 PM, Werner LEMBERG w...@gnu.org wrote:

  i gave the following command,
  r...@ubuntu:~/Downloads/ft2demos-2.3.9# make FT2DEMOS=1
  ../freetype2/Makefile

 You've missed the `-f' option:

  make FT2DEMOS=1 -f ../freetype2/Makefile


Werner

___
Freetype mailing list
Freetype@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype


[ft] How to get correct bitmap

2010-01-25 Thread samaram s
Hi,

I am trying with the example1 from the tutorial and learning with it how to
use the freetype API's. Thankful to all the team who developed a wonderful
application.

I am confused with the bitmap buffer that i am getting,
Here is the code.(Same as example1 code)

#define WIDTH   100
#define HEIGHT  500

void
draw_bitmap( FT_Bitmap*  bitmap,
 FT_Int  x,
 FT_Int  y)
{
  FT_Int  i, j, p, q;
  FT_Int  x_max = x + bitmap-width;
  FT_Int  y_max = y + bitmap-rows;
  FILE *fp;
  printf(X  is %d\n,x);
  printf(Y is %d\n,y);
  printf(Bitmap width is %d\n,bitmap-width);
  printf(Bitmap rows is %d\n,bitmap-rows);
  for ( i = x, p = 0; i  x_max; i++, p++ )
  {
for ( j = y, q = 0; j  y_max; j++, q++ )
{
  if ( i  0  || j  0   ||
   i = WIDTH || j = HEIGHT )
continue;

  image[j][i] |= bitmap-buffer[q * bitmap-width + p];
 }

}
}
Here is my show_image()

void
show_image(  FT_Bitmap*  bitmap )
{
  int  i, j;


  for ( i = 0; i  HEIGHT; i++ )//HEIGHT
  {
for ( j = 0; j  WIDTH; j++ )

 if( image[i][j]  128)
   putchar('.');
 else
   putchar('*');

   putchar( '\n' );
}
}

These are my output values,
Text C
Bitmap Left 10
Bitmap Top 314
X  is 10
Y is 186
Bitmap width is 11
Bitmap rows is 12


When i tried converting a glyph C into bitmap,I can able to get the
character in bitmap but,i couldnt able to understand why image[i][j]128 we
are printing . (a dot)
Is there anyway i can just get the character bitmap ...nothing else with
that.
Also,
Why is the charater coming somewhere in the middle of a box.
i mean given a resolution 100*500 screen it is appearing somewhere down.Why
is it so?

I have attached my output in a PNG file.How can i understand the bitmap
buffer?

Thanks a lot

-sam
attachment: convert_glyph.PNG___
Freetype mailing list
Freetype@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype


Re: [ft-devel] Bug in the font or bug in freetype?

2010-01-25 Thread mpsuzuki
Dear Werner,

On Sat, 23 Jan 2010 15:18:55 +0100 (CET)
Werner LEMBERG w...@gnu.org wrote:
BTW, in a mail you've mentioned that you want to take care of this
bug:

  http://lists.gnu.org/archive/html/freetype-devel/2009-12/msg00022.html

Is there any progress?

Oops, I'm quite sorry, I've slipped working for this issue,
due to the lack of sample to reproduce the problem. In fact,
Jimmy said all Type42 font does not work, but Type42 fonts
converted by fontforge works well in my environment.

Since 2009-Jan-05, the incremental font interface has been
enabled by default, so his patch should be following. I've
checked that it does not reopen Savannah bug #25010, in
both cases of incremental font interfaces enabled/disabled.

Could I commit this patch to GIT head?

Regards,
mpsuzuki


diff --git a/builds/unix/install-sh b/builds/unix/install-sh
old mode 100644
new mode 100755
diff --git a/src/truetype/ttgload.c b/src/truetype/ttgload.c
index 74fb73d..cd11c12 100644
--- a/src/truetype/ttgload.c
+++ b/src/truetype/ttgload.c
@@ -1278,13 +1278,9 @@
 
 if ( loader-byte_len  0 )
 {
-#ifdef FT_CONFIG_OPTION_INCREMENTAL
   /* for the incremental interface, `glyf_offset' is always zero */
   if ( !loader-glyf_offset
!face-root.internal-incremental_interface )
-#else
-  if ( !loader-glyf_offset )
-#endif /* FT_CONFIG_OPTION_INCREMENTAL */
   {
 FT_TRACE2(( no `glyf' table but non-zero `loca' entry\n ));
 error = TT_Err_Invalid_Table;



___
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] Open Type Font Support on Mobile Devices?

2010-01-25 Thread Behdad Esfahbod
Hi Maggy,

First, you would need FriBidi or another bidi implementation even if you use
HarfBuzz.

Next, for Arabic shaping, FriBidi does a very basic job of that, with no
advanced substitution/positioning involved and hence no need for GSUB/GPOS
tables.  For anything more than basic Arabic you need HarfBuzz.

behdad

On 01/24/2010 10:30 PM, Maggy Anastasia wrote:
 Hi Behdad,
 
 
 At the moment I am trying to use HarfBuzz (and FreeType) to deal with these 
 tables. The only reason for me to do so (at least at current moment) is to 
 render Arabic font correctlly.
 
 you mentioned that if the primary use is to get Arabic rendering, I can use 
 FriBidi only to do so.
 Does FriBidi2 needs advance typography tables (GPOS, GSUB, etc) as input? I 
 looked at the interface of fribidi, it seems to me that freebidi output is 
 independent from
 
  font files (ttf or otf) and  that the information regarding glyph 
 substitution, joining, etc is already defined in a built in lookup table 
 (please correct me if I am wrong).
 If this is the case, if I want to render the arabic text using certain font, 
 is it true that for glyph positioning, i would still need to use the 
 information in GPOS table, thus requiring me to use 
 
 HarfBuzz and FreeType?
 
 I am so sorry if my question is too basic, I have no prior knowledge on 
 Arabic typography. I am basically in need of enlightenment on when to use 
 fribidi, 
 harfbuzz and freetype and whether I should combine any of these in this 
 situation.
 
 
 best regards
 
 Maggy Anastasia Suryanto
 
 
 
 Hi,
 
 
 For OpenType complex shaping you need HarfBuzz [1]. Google engineers are
 working on using it for the Chromium port on Linux [2]. Using Pango with
 the FreeType backend is a simpler solution (Pango+FreeType uses HarfBuzz
 internally).
 
 If your primary use is to get Arabic rendering done, you can get away
 with using FriBidi2 [3] only.
 
 behdad
 
 
 [1] http://freedesktop.org/wiki/Software/HarfBuzz
 [2] http://lists.freedesktop.org/archives/harfbuzz/2009-March/000312.html
 
 [3] http://fribidi.freedesktop.org/
 
 
 
 On 04/09/2009 05:19 AM, Waqar Ahmad wrote:
 
 Hi,
 
 
 Is there anybody who has been working on font related stuff on mobile
 devices? I am interested in getting Open Type Font (OTF) support on
 symbian, windows mobile devices and most likely on Android in future
 
 as well. As far as I know, Open Type Fonts (Arabic, Urdu etc.) are not
 supported on Symbian and Windows Mobile devices. FreeType does not
 support GSUB and GPOS.
 
 
 I am thinking about porting an existing open source OTF solution to
 mobile devices. A few possibilities that come in my mind are mentioned
 below and suggestions from members of this list are solicited.
 
 
 -Is there any good port of FreeType for Symbian and Windows Mobile
 available in open source? If it is there, I can try to further extend
 it to add required support for OTF.
 
 
 -If somebody has experience of working with Pango and consider it good
 for porting to mobile devices, this can be another option to explore.
 
 
 -Google Adroid is using FreeType, however, I don't know if they have
 added any support for OTF. One way could be to take FreeType from
 Android (assuming it would have been optimized for constrained mobile
 
 devices) and add support for OTF.
 
 
 I would highly appreciate suggestions and guidelines from this list on
 above matters.
 
 
 Best Regards,
 Waqar
 
 
 
 
 However, I am not sure if Open Type Font are completely supported or
 not in FreeType library.
 
 
 Specifically, I am interested in Urdu and Arabic languages support
 which require a number of rules for appropriate text rendering like
 glyph positioning and substitution. I want to know if such features
 
 are supported in FreeType library? If not, is there any other project
 in your knowledge that is working on something similar to what I am
 interested in?
 
 
 I will highly appreciate your guidance in this regard.
 
 
 
 ___
 Freetype-devel mailing list
 addr...@hidden
 http://lists.nongnu.org/mailman/listinfo/freetype-devel
 
 
 
 
 
 ___
 Freetype-devel mailing list
 Freetype-devel@nongnu.org
 http://lists.nongnu.org/mailman/listinfo/freetype-devel


___
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel