GSET_TEXT_FONT_PREC(3NCARG)

πŸ“¦ version 6.6.2, in epel 9, fedora 43, fedora 44

πŸ’… GSET_TEXT_FONT_PREC πŸ’…

okay bestie, welcome to the NCAR GRAPHICS manual, page GSET_TEXT_FONT_PREC(3NCARG) β€” yes she's from the NCAR Graphics crew and she is serving typography. this one's literally just "set the text font and precision," but the way she does it? iconic. let's get into it πŸŽ€

✨ NAME ✨

gset_text_font_prec (Set text font and precision) β€” she sets the text font and precision. that's it. that's the whole job. and she ate. πŸ’–


🌸 SYNOPSIS 🌸

#include <ncarg/gks.h>

void gset_text_font_prec(const Gtext_font_prec *text_font_prec);

like, one include, one function call, one little pointer to a struct. lowkey elegant.


πŸ¦‹ DESCRIPTION πŸ¦‹

so text_font_prec is a struct and she's got two fields, and both of them matter. let's meet them 🫢

text_font_prec.font

(Gint, Input) β€” this is the font you're gonna use in every subsequent call to the gtext output primitive. choose wisely, bestie. the options are:

  • 1 β€” ASCII font (this is the default, no cap)
  • -2 β€” Hershey cartographic Roman
  • -3 β€” Hershey cartographic Greek
  • -4 β€” Hershey simplex Roman
  • -5 β€” Hershey simplex Greek
  • -6 β€” Hershey simplex script
  • -7 β€” Hershey complex Roman
  • -8 β€” Hershey complex Greek
  • -9 β€” Hershey complex script
  • -10 β€” Hershey complex italic
  • -11 β€” Hershey complex Cyrillic
  • -12 β€” Hershey duplex Roman
  • -13 β€” Hershey triplex Roman
  • -14 β€” Hershey triplex italic
  • -15 β€” Hershey Gothic German
  • -16 β€” Hershey Gothic English
  • -17 β€” Hershey Gothic Italian
  • -18 β€” Hershey math symbols
  • -19 β€” Hershey symbol set 1
  • -20 β€” Hershey symbol set 2
okay so real talk about the Hershey fonts πŸ“ β€” they are not standardized by GKS, they're locally implemented in NCAR GKS-0A. and GKS says that locally implemented fonts have to get negative font numbers, which is exactly why every single Hershey option up there is negative. rules are rules, iykyk. and if you wanna actually see the Hershey fonts? go look at the plots produced from the PLOTCHAR example β€” run "ncargex epltch" to get a metafile, then go examine the plot titled "PLCHHQ - FONTCAP DATABASES ADDED 6/90". the font numbers in there are the absolute values of the text_font_prec.font value described here. why the difference? because PLOTCHAR has no need to follow the structures that GKS imposes on font names for gset_text_font_prec. she's free. she's unbothered. πŸ’…

text_font_prec.prec

(Input) β€” this one gives the precision used in subsequent calls to the gtext output primitive, for the font type in text_font_prec.font. your options, bestie:

  • GPREC_STRING β€” String precision (good). this is the GKS default. solid. respectable. ✨
  • GPREC_CHAR β€” Character precision (better). we love an upgrade.
  • GPREC_STROKE β€” Stroke precision (best). and this is the default for NCAR GSK-0A. periodt. πŸ‘‘

πŸ”₯ USAGE πŸ”₯

so here's the tea β˜• β€” the way you access the Hershey fonts genuinely changes stuff:

  • if you access the Hershey fonts via gset_text_font_prec and gtext, then the characters are not stroked until viewing time.
  • if you access the Hershey fonts via PLOTCHAR, then the characters are stroked by PLOTCHAR itself.

and this can make a significant difference in metafile sizes. not me warning you about your file sizes 😭 plan accordingly.


🌈 ACCESS 🌈

to use the GKS C-binding routines, load the ncarg_gks and ncarg_c libraries. both. don't skip one, she'll notice. 🧚


πŸ’œ SEE ALSO πŸ’œ

Online: gtext(3NCARG), gset_text_path(3NCARG), gset_text_align(3NCARG), gset_char_ht(3NCARG), gset_char_space(3NCARG), gset_char_up_vec(3NCARG), gset_char_expan(3NCARG), gset_colr_rep(3NCARG), gset_text_colr_ind(3NCARG), ginq_text_path(3NCARG), ginq_text_align(3NCARG), ginq_text_font_prec(3NCARG), ginq_char_ht(3NCARG), ginq_char_space(3NCARG), ginq_char_up_vec(3NCARG), ginq_char_expan(3NCARG), plotchar(3NCARG), gks(3NCARG), ncarg_gks_cbind(3NCARG)

Hardcopy: User's Guide for NCAR GKS-0A Graphics; NCAR Graphics Fundamentals, UNIX Version

like, she has a whole friend group. go read them too. πŸ’–


Copyright (C) 1987-2009 University Corporation for Atmospheric Research The use of this Software is governed by a License Agreement.


and that's the whole page, bestie!! πŸŽ€ this manual page is from the UNIX manual set, dated March 1993, and it lives under GSET_TEXT_FONT_PREC(3NCARG) β€” so go forth and set your fonts with precision, literally. slay, stay stroked (or not, depending on your metafile budget), and i'll see you in the next man page πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from