GSET_TEXT_FONT_PREC(3NCARG)
π 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 thetext_font_prec.fontvalue described here. why the difference? because PLOTCHAR has no need to follow the structures that GKS imposes on font names forgset_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_precandgtext, 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 π
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
- epel 9: ncl-devel 6.6.2-59.el9 Β· LicenseRef-Callaway-BSD
- fedora 43: ncl-devel 6.6.2-58.fc43 Β· LicenseRef-Callaway-BSD
- fedora 44: ncl-devel 6.6.2-62.fc44 Β· LicenseRef-Callaway-BSD
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms