Braden McDaniel | 4 Dec 2002 16:58
Gravatar

Re: Outline vertices

On Wed, 27 Nov 2002 15:51:17 +0100, David Turner wrote:

> Very frankly, you'd better use the global bounding box instead of the
> EM. The latter is really a convenience for font designers as well as
> a technical detail of font implementations. There is *no* aesthetical
> meaning associated to it, thinking otherwise would be a mistake.
> 
> Applications should not use this as a basic for text layout and
> measurement, only to apply scaling to device pixels when needed.

Alright, then. Thanks again. :-)

Braden
Lars Clausen | 6 Dec 2002 04:50
Picon

Questions before releasing


Hi!

We're getting close to a new release of Dia
<URL:http://www.lysator.liu.se/~alla/dia/dia.html>, in which the Unix-side
font handling is entirely done with PangoFT2.  It looks much better.  I
have a couple questions before releasing, though.

How do I check in my configure that I have a recent enough libfreetype?  I
see that 2.0.9 fixed a problem for us, and would like to have at least that
version.  The debian libfreetype6-dev comes with a freetype-config program,
but its --version output is 9.1.3, which doesn't make much sense.  What's
the generally accepted way to check the version?

I am considering distributing three standard fonts (for sans, serif and
monospace, the only fonts our objects are supposed to name).  What would be
the right way to distribute these fonts using Automake so that Freetype can
find them?  Or should I leave that entirely up to the packagers?

Thanks,
-Lars

--

-- 
Lars Clausen (http://shasta.cs.uiuc.edu/~lrclause)| HÃ¥rdgrim of Numenor
"I do not agree with a word that you say, but I   |----------------------------
will defend to the death your right to say it."   | Where are we going, and
    --Evelyn Beatrice Hall paraphrasing Voltaire  | what's with the handbasket?
Werner LEMBERG | 6 Dec 2002 11:23
Picon

Re: Questions before releasing


> How do I check in my configure that I have a recent enough
> libfreetype?  I see that 2.0.9 fixed a problem for us, and would
> like to have at least that version.  The debian libfreetype6-dev
> comes with a freetype-config program, but its --version output is
> 9.1.3, which doesn't make much sense.

It makes sense, but unfortunately we forgot to update libtool's
version number.  From VERSION.DLL in the current snapshot:

  Libtool's version for FreeType 2.1.3 is `9.2.3'.

  On most platforms, the soname will be `6.3.2'
  (e.g. `libfreetype.so.6.3.2').

  Libtool's version for FreeType 2.1.2 is `9.1.3'.

  On most platforms, the soname will be `6.3.1'
  (e.g. `libfreetype.so.6.3.1').

> I am considering distributing three standard fonts (for sans, serif and
> monospace, the only fonts our objects are supposed to name).  What would be
> the right way to distribute these fonts using Automake so that Freetype can
> find them?  Or should I leave that entirely up to the packagers?

Leave it to the packager.

    Werner
Lars Clausen | 6 Dec 2002 15:29
Picon

Re: Questions before releasing

On Fri, 06 Dec 2002, Werner LEMBERG wrote:
> 
>> How do I check in my configure that I have a recent enough
>> libfreetype?  I see that 2.0.9 fixed a problem for us, and would
>> like to have at least that version.  The debian libfreetype6-dev
>> comes with a freetype-config program, but its --version output is
>> 9.1.3, which doesn't make much sense.
> 
> It makes sense, but unfortunately we forgot to update libtool's
> version number.  From VERSION.DLL in the current snapshot:
> 
>   Libtool's version for FreeType 2.1.3 is `9.2.3'.
> 
>   On most platforms, the soname will be `6.3.2'
>   (e.g. `libfreetype.so.6.3.2').
> 
>   Libtool's version for FreeType 2.1.2 is `9.1.3'.
> 
>   On most platforms, the soname will be `6.3.1'
>   (e.g. `libfreetype.so.6.3.1').

That's... rather confusing.  What do I do to check if a freetype >= 2.0.9
is installed?

>> I am considering distributing three standard fonts (for sans, serif and
>> monospace, the only fonts our objects are supposed to name).  What would
>> be the right way to distribute these fonts using Automake so that
>> Freetype can find them?  Or should I leave that entirely up to the
>> packagers?
> 
(Continue reading)

Paul Miller | 6 Dec 2002 18:41

Freetype 2.1.3 Mac bugs

Updated to 2.1.3 (from 2.0.8) and found some Mac bugs. One has crept in 
since 2.0.8, and one has been there for a long time.

1. file_spec_from_path() for TARGET_API_MAC_CARBON is broken.

	FSPathMakeRef() takes a pascal string (as most, if not all, Mac path 
functions do), but a C string is passed to it. So it always fails.

The NON-carbon code there works for both cases, so the 
TARGET_API_MAX_CARBON code should be removed. The new function should just be:

   /* Given a pathname, fill in a file spec. */
   static int
   file_spec_from_path( const char*  pathname,
                        FSSpec*      spec )
   {
     Str255    p_path;
     FT_ULong  path_len;

     /* convert path to a pascal string */
     path_len = ft_strlen( pathname );
     if ( path_len > 255 )
       return -1;
     p_path[0] = (unsigned char)path_len;
     ft_strncpy( (char*)p_path + 1, pathname, path_len );

     if ( FSMakeFSSpec( 0, 0, p_path, spec ) != noErr )
       return -1;
     else
       return 0;
(Continue reading)

Paul Miller | 6 Dec 2002 18:58

Freetype 2.1.3 Mac bugs - proper dfont handling

(DISCLAIMER - I'm NOT a Mac-Head - I have no idea what I am doing. I'd 
rather have teeth pulled then use a Mac, but unfortunately I have to 
support it as a platform)

>2. multi-resource .dfont files dont seem to work. If I try to load the 
>second or third FOND from a dfont file (like Helvetica.dfont, etc) to get 
>the Bold or Italic versions, it doesn't work for some reason. I'm looking 
>into this now.

Ah - I see the problem now.

dfonts are not resource files. Yet the code in FT_New_Face_From_dfont 
treats the file as a resource file. For some reason, Get1IndResource() with 
a res_index of 0 gets the first face. But if res_index is not 0, it returns 
NULL.

Does anyone know how dfont files are really supposed to work, to get the 
second/third faces?
Leonard Rosenthol | 6 Dec 2002 19:15

Re: Freetype 2.1.3 Mac bugs - proper dfont handling

At 11:58 AM -0600 12/6/02, Paul Miller wrote:
>dfonts are not resource files.

	Actually, they are!    A .dfont is the equivalent of a Mac OS 
9 "Font Suitcase", but with the resource fork as a data fork 
instead...

>Yet the code in FT_New_Face_From_dfont treats the file as a resource 
>file. For some reason, Get1IndResource() with a res_index of 0 gets 
>the first face. But if res_index is not 0, it returns NULL.

	This code worked fine previously.

	What version of Mac OS X are you using?

Leonard
--

-- 
---------------------------------------------------------------------------
Leonard Rosenthol                            <mailto:leonardr <at> lazerware.com>
                      			     <http://www.lazerware.com>
Paul Miller | 6 Dec 2002 19:21

Re: Freetype 2.1.3 Mac bugs - proper dfont handling


>         Actually, they are!    A .dfont is the equivalent of a Mac OS 9 
> "Font Suitcase", but with the resource fork as a data fork instead...

Ah - ok that makes sense. I THOUGHT it used to work before too!

>         This code worked fine previously.
>
>         What version of Mac OS X are you using?

Should that matter? I think it's the latest, non-Jaguar version.  10.1.?
Werner LEMBERG | 6 Dec 2002 23:18
Picon

Re: Questions before releasing

> > It makes sense, but unfortunately we forgot to update libtool's
> > version number.  From VERSION.DLL in the current snapshot:
> > 
> >   Libtool's version for FreeType 2.1.3 is `9.2.3'.
> > 
> >   On most platforms, the soname will be `6.3.2'
> >   (e.g. `libfreetype.so.6.3.2').
> > 
> >   Libtool's version for FreeType 2.1.2 is `9.1.3'.
> > 
> >   On most platforms, the soname will be `6.3.1'
> >   (e.g. `libfreetype.so.6.3.1').
> 
> That's... rather confusing.  What do I do to check if a freetype >=
> 2.0.9 is installed?

Normally, the FreeType version is rather meaningless (provided that
the libtool version number is updated properly which we missed for
2.1.2).  If you really want a test for 2.0.9, check freetype.h for
`FREETYPE_MAJOR', `FREETYPE_MINOR', and `FREETYPE_PATCH' with grep.

Writing a C program to read out these macros won't work with dynamic
libraries, and FT_Library_Version is buggy up to 2.1.3.

    Werner
Lars Clausen | 7 Dec 2002 00:04
Picon

Re: Questions before releasing

On Fri, 06 Dec 2002, Werner LEMBERG wrote:
>> That's... rather confusing.  What do I do to check if a freetype >=
>> 2.0.9 is installed?
> 
> Normally, the FreeType version is rather meaningless (provided that
> the libtool version number is updated properly which we missed for
> 2.1.2).  If you really want a test for 2.0.9, check freetype.h for
> `FREETYPE_MAJOR', `FREETYPE_MINOR', and `FREETYPE_PATCH' with grep.
> 
> Writing a C program to read out these macros won't work with dynamic
> libraries, and FT_Library_Version is buggy up to 2.1.3.

For those in the same boat, here's some configure.in code to test for the
freetype version:

    AC_MSG_CHECKING([for version of FreeType])
    FREETYPE_INCLUDE=`freetype-config --cflags | cut -c3-`
    FREETYPE_MAJOR=`grep '^#define FREETYPE_MAJOR' $FREETYPE_INCLUDE/freetype/freetype.h | cut -d' ' -f3`
    FREETYPE_MINOR=`grep '^#define FREETYPE_MINOR' $FREETYPE_INCLUDE/freetype/freetype.h | cut -d' ' -f3`
    FREETYPE_PATCH=`grep '^#define FREETYPE_PATCH' $FREETYPE_INCLUDE/freetype/freetype.h | cut -d' ' -f3`
    FREETYPE_VERSION=`echo | awk "BEGIN { printf \"%d\", ($FREETYPE_MAJOR * 1000 + $FREETYPE_MINOR) * 1000 + $FREETYPE_PATCH;}"`
    AC_MSG_RESULT([$FREETYPE_MAJOR.$FREETYPE_MINOR.$FREETYPE_PATCH])
    if test "$FREETYPE_VERSION" -ge 2000009; then

-Lars

--

-- 
Lars Clausen (http://shasta.cs.uiuc.edu/~lrclause)| HÃ¥rdgrim of Numenor
"I do not agree with a word that you say, but I   |----------------------------
will defend to the death your right to say it."   | Where are we going, and
(Continue reading)


Gmane