[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft-devel] GF + TFM
From: |
Werner LEMBERG |
Subject: |
Re: [ft-devel] GF + TFM |
Date: |
Fri, 27 Jul 2018 10:53:16 +0200 (CEST) |
> For testing the `tfm' module in `ftview', I tried to do some changes
> in the `ftcommon.c' file, but could not solve the problem, can you
> tell me what am I missing in this.
>
> Here is the diff of my changes in `ftcommon.c':
>
> diff --git a/src/ftcommon.c b/src/ftcommon.c
> index 1ef3495..3526231 100644
> --- a/src/ftcommon.c
> +++ b/src/ftcommon.c
> @@ -236,7 +236,7 @@
> const char* format = FT_Get_Font_Format( *aface );
>
>
> - if ( !strcmp( format, "Type 1" ) )
> + if ( !strcmp( format, "Type 1" ) || !strcmp( format, "gf" ) )
[Not pertinent to the issue, but... Please do
#define FT_FONT_FORMAT_GF "GF"
(in `svfntfmt.h' to get uppercase font format name.)]
> {
> char orig[5];
> char* suffix = (char*)strrchr( font->filepathname, '.' );
> @@ -251,10 +251,18 @@
> /* we have already allocated four more bytes */
> suffix = (char*)font->filepathname + strlen( font->filepathname );
>
> - memcpy( suffix, ".afm", 5 );
> - if ( FT_Attach_File( *aface, font->filepathname ) )
> + if( !strcmp( format, "Type 1" ) )
> {
> - memcpy( suffix, ".pfm", 5 );
> + memcpy( suffix, ".afm", 5 );
> + if ( FT_Attach_File( *aface, font->filepathname ) )
> + {
> + memcpy( suffix, ".pfm", 5 );
> + FT_Attach_File( *aface, font->filepathname );
> + }
> + }
> + else if( !strcmp( format, "gf" ) )
> + {
> + memcpy( suffix, ".tfm", 5 );
> FT_Attach_File( *aface, font->filepathname );
> }
This looks correct. What problem do you have? What does
FT2_DEBUG=any:7 ftview ...
say? If you don't get meaningful debug output from the GF and TFM
drivers, you obviously haven't added enough FT_TRACE[0-9] calls :-)
Werner
- Re: [ft-devel] GF + TFM, (continued)
- Re: [ft-devel] GF + TFM, Werner LEMBERG, 2018/07/20
- Re: [ft-devel] GF + TFM, Parth Wazurkar, 2018/07/25
- Re: [ft-devel] GF + TFM, Werner LEMBERG, 2018/07/25
- Re: [ft-devel] GF + TFM, Parth Wazurkar, 2018/07/25
- Re: [ft-devel] GF + TFM, Werner LEMBERG, 2018/07/25
- Re: [ft-devel] GF + TFM, Parth Wazurkar, 2018/07/25
- Re: [ft-devel] GF + TFM, Parth Wazurkar, 2018/07/25
- Re: [ft-devel] GF + TFM, Werner LEMBERG, 2018/07/25
- Re: [ft-devel] GF + TFM, Parth Wazurkar, 2018/07/25
- Re: [ft-devel] GF + TFM, Parth Wazurkar, 2018/07/27
- Re: [ft-devel] GF + TFM,
Werner LEMBERG <=
- Re: [ft-devel] GF + TFM, Parth Wazurkar, 2018/07/27
- Re: [ft-devel] GF + TFM, Parth Wazurkar, 2018/07/28
- Re: [ft-devel] GF + TFM, Werner LEMBERG, 2018/07/28
- Re: [ft-devel] GF + TFM, Parth Wazurkar, 2018/07/28
- Re: [ft-devel] GF + TFM, Werner LEMBERG, 2018/07/20
- Re: [ft-devel] GF + TFM, Parth Wazurkar, 2018/07/20
- Re: [ft-devel] GF + TFM, Werner LEMBERG, 2018/07/20
- Re: [ft-devel] GF + TFM, Parth Wazurkar, 2018/07/20
- Re: [ft-devel] GF + TFM, Werner LEMBERG, 2018/07/20