octave-maintainers
[Top][All Lists]
Advanced

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

Re: Freetype-based text rendering and font discovery


From: Ben Abbott
Subject: Re: Freetype-based text rendering and font discovery
Date: Wed, 24 Jun 2009 13:06:32 -0400

 On Wednesday, June 24, 2009, at 12:48PM, "Michael Goffioul" <address@hidden> 
wrote:
>On Wed, Jun 24, 2009 at 5:38 PM, John W. Eaton<address@hidden> wrote:
>> On 23-Jun-2009, Michael Goffioul wrote:
>>
>> | I'm currently working on text rendering in the OpenGL backend, using
>> | freetype. I have a draft working version that contains enough to render
>> | tick labels, axe labels and title, as well as basic text objects
>> | (90x-rotated, no background, no border, no margin...).
>> |
>> | But before commiting anything, I'd also like to add basic font discovery
>> | mechanism. Up to now, I'm using an hardcoded TTF font that will only
>> | work under Windows.
>> |
>> | I'm thinking about using fontconfig, which I guess is widely spread
>> | in UNIX environment. To make it simple in the configure script, I'm
>> | thinking about using pkg-config to find out fontconfig compilation flags.
>> |
>> | Would these added dependencies be acceptable?
>>
>> It's OK with me for Octave to depend directly on fontconfig.  Should
>> it be a hard requirement, or should we still allow the OpenGL graphics
>> code to be compiled if fontconfig is not found?
>
>The way I coded it is that when fontconfig is not present,
>text rendering will use a default hardcoded font instead.
>At the moment, I only added that specific font for Win32
>platform, using Verdana font (standard font I guess since
>WinXP).
>
>Michael.

The gnuplot backend is also in need of a default font as well. I've been 
looking at a GNU solution.

    http://www.gnu.org/software/freefont/index.html

If fontconfig and freefont are added as a dependencies (or freefont might be 
included with Octave?) then I am confident the gnuplot backend can use 
freesans, freeserif, and freemono without much effort.

Would such meet the needs of the fltk backend as well?

Ben




reply via email to

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