freetype
[Top][All Lists]
Advanced

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

Re: [ft] otf autohint/nohint problem


From: Werner LEMBERG
Subject: Re: [ft] otf autohint/nohint problem
Date: Tue, 22 Nov 2005 07:10:35 +0100 (CET)

> > > I think that use of a font that needs a module that has been
> > > removed should result in an error code.
> >
> > Normally, it does.  The exception is the hinter which isn't
> > needed.
>
> Are you saying that pshinter is not needed to render the font?

Yes.

> I think it is for the trade gothic font because the hint data is for
> the pshinter and not using the pshinter at small sizes results in a
> poor/wrong appearance.

This is the choice of the application.  Maybe you don't need small
font sizes, then a (PS) hinter is completely useless.

> Where are the error codes for needed but removed modules listed?
> Ftmodule.h seems like an obvious place, per module.  Something like:
>
> /* If a font needs pshinter_module then FT_Load_Char() returns
> FT_ERROR_PSHINTER_MODULE_NEEDED. */
> FT_USE_MODULE(pshinter_module_class)

All error codes are in file fterrdef.h.  You can check with
FT_Get_Module whether a module is available or not.

> Looking through fterrdef.h, I don't see any module or driver not
> configured errors, so I'm not sure why you say such errors codes are
> normally returned.  Is there a number of such an error, in case I
> missed it?

Well, font format modules are completely independent from each other.
If a font can't be handled by FreeType, you get an
FT_Err_Unknown_File_Format error.  FreeType itself can't test for,
say, a BDF font if the BDF module hasn't been compiled in.  Both font
recognition and handling are part of the specific module.

> Ultimately, I'm trying to say that I should have just gotten a non
> zero number from FT_Load_Char, looked the error up, and fixed the
> configuration, instead having to bug the freetype list experts. :)

I only can repeat that rasterizing a font without a hinter makes
sense, and that FreeType won't return an error if no hinter is
available, even if you don't select FT_LOAD_NO_HINTING.  Remember that
there are font formats without any hints (e.g., bitmaps).

> > What's the problem with FT_LOAD_NO_HINTING?
>
> I somehow didn't notice it.  Its functionality seems good.  Perhaps
> you can group the hint choice options together to make them clear?

All FT_LOAD_XXX flags are described in one group.

> None of the hint options appear next to each other in freetype.h or
> refer to each other.  Maybe making them all have similar base names
> like FT_LOAD_HINT_NONE, FT_LOAD_HINT_AUTO and FT_LOAD_HINT_DEFAULT,
> and group them together in freetype.h, would clearly express how
> you've designed them to work?

I've added references to each other.


    Werner




reply via email to

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