> 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

_______________________________________________
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel

Reply via email to