Questions on xlfd and other fonts: proper usage with -draw?

Tom Browder <[email protected]> Sat, 22 Dec 2018 08:23:45 -0600
Newsgroups gmane.comp.video.graphicsmagick.help
Message-ID <CAFMGiz8fKjJaEVwe1mCrPD1qq6AoWE=U84Ovs1gWk6OJM2tQGA@mail.gmail.com>
First, thanks for a wonderful project! I first used GM via the Perl 5
interface about eight years ago to create and manage my college class
website (https://usafa-1965.org) and it is still being used today to
add a black border around the picture of deceased classmates. I
couldn’t have created the site without GM.

Now I am using GM with Perl 6 (https://perl6.org) by executing gm
commands via Perl 6’s shell routine to annotate and crop pictures
taken via my wife’s iPhone.

In the process, I have collected all the scalable fonts’ xlfd names
and use them as arguments to the ‘-font’ option.

So far my results have been satisfactory, but I do have several
questions regarding font use for annotation:

My goal is to be able to provide a label with a given font and know
its dimensions algorithmically just as I can do with PostScript Type 1
fonts.

My preference is to use PostScript Type 1 fonts if at all possible for
annotation—I just need to know how to ensure GM can find them.

Questions:

1.  For an xlfd font, do I need to specify the font size in both the
name as well as after the -pointsize option?

2. For a PostScript Type 1 font, what name do I use with the -font
option? I have had success using ‘helvetica’ alone but haven’t yet
been able to see any change when I try to make it bold.

3. Where do I find the mapping of the xlfd scalable font names to the
source of font metrics?

4. Does it matter whether the -pointsize option comes before or after
the -font option?

5. For the -pointsize option, is that in units of PostScript points or pixels?

6. When using scalable xlfd fonts, are values in the four fields
affecting size and resolution being used?

7. If the answer to question 6 is yes, how do those fields interact
with each other and with the -pointsize option?

Thank you.

With warmest regards,

-Tom


_______________________________________________
Graphicsmagick-help mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/graphicsmagick-help