freetype
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft] Embedded Design - Printer Controller


From: suzuki toshiya
Subject: Re: [ft] Embedded Design - Printer Controller
Date: Fri, 06 Apr 2012 13:52:10 +0900
User-agent: Mozilla-Thunderbird 2.0.0.12 (X11/20080406)

Hi,

FT_Render_Glyph_Internal() does like:

  FT_Render_Glyph_Internal( FT_Library      library,
                            FT_GlyphSlot    slot,
                            FT_Render_Mode  render_mode )
  {
    FT_Error     error = FT_Err_Ok;
    FT_Renderer  renderer;


    /* if it is already a bitmap, no need to do anything */
    switch ( slot->format )
    {
    case FT_GLYPH_FORMAT_BITMAP:   /* already a bitmap, don't do anything */
      break;

    default:
      {
        FT_ListNode  node   = 0;
        FT_Bool      update = 0;


        /* small shortcut for the very common case */
        if ( slot->format == FT_GLYPH_FORMAT_OUTLINE )
        {
          renderer = library->cur_renderer;
          node     = library->renderers.head;
        }
        else
          renderer = FT_Lookup_Renderer( library, slot->format, &node );

        error = FT_Err_Unimplemented_Feature;
        while ( renderer )
        {
          error = renderer->render( renderer, slot, render_mode, NULL );
          if ( !error                                               ||
               FT_ERROR_BASE( error ) != FT_Err_Cannot_Render_Glyph )
            break;

So, it is dependent with how FT2 recognizes the font format and
which render_mode is given to this function. Could you check
the values of slot->format (passed to FT_Lookup_Renderer()) and
the render_mode (passed to FT_Render_Glyph_Internal())?

Regards,
mpsuzuki

Allen Wells wrote:
> Hi,
> 
>     I am currently in the debugging stages of implementing the Freetype2 
> code in an embedded printer controller. I used INSTALL.ANY to select the 
> C files to include in the build. I configured ftmodule.h as shown below.
> 
> 
> //FT_USE_MODULE( FT_Module_Class, autofit_module_class )
> FT_USE_MODULE( FT_Driver_ClassRec, tt_driver_class )
> //FT_USE_MODULE( FT_Driver_ClassRec, t1_driver_class )
> //FT_USE_MODULE( FT_Driver_ClassRec, cff_driver_class )
> //FT_USE_MODULE( FT_Driver_ClassRec, t1cid_driver_class )
> //FT_USE_MODULE( FT_Driver_ClassRec, pfr_driver_class )
> //FT_USE_MODULE( FT_Driver_ClassRec, t42_driver_class )
> //FT_USE_MODULE( FT_Driver_ClassRec, winfnt_driver_class )
> //FT_USE_MODULE( FT_Driver_ClassRec, pcf_driver_class )
> //FT_USE_MODULE( FT_Module_Class, psaux_module_class )
> FT_USE_MODULE( FT_Module_Class, psnames_module_class )
> FT_USE_MODULE( FT_Module_Class, pshinter_module_class )
> FT_USE_MODULE( FT_Renderer_Class, ft_raster1_renderer_class )
> FT_USE_MODULE( FT_Module_Class, sfnt_module_class )
> //FT_USE_MODULE( FT_Renderer_Class, ft_smooth_renderer_class )
> //FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcd_renderer_class )
> //FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcdv_renderer_class )
> //FT_USE_MODULE( FT_Driver_ClassRec, bdf_driver_class )
> 
> /* EOF */
> 
> My goal is to configure a font system that only supports TrueType fonts 
> on a monochrome printer.
> 
> My difficulty is in the module FT_Render_Glyph_Internal() in ftobjs.c.  
> FT_Err_Unimplemented_Feature (0x07) gets set first and then  
> Cannot_Render_Glyph (0x13) gets set with the call to renderer->render( 
> renderer, slot, render_mode, NULL ).
> 
> Since I have a renderer selected in ftmodules.h, I am at a loss as to 
> why the error codes are showing up.
> 
> Any help would be much appreciated,
> 
> Thanks,
> Allen
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Freetype mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/freetype




reply via email to

[Prev in Thread] Current Thread [Next in Thread]