GSET_TEXT_FONT_PREC(3NCARG)
β¨ GSET_TEXT_FONT_PREC β¨ (aka the NCAR Graphics glow-up for your letters)
okay so bestie, welcome to gset_text_font_prec from the NCAR Graphics manual (the 3NCARG section, we're in the C-binding girlie zone π
). Full name on the birth certificate: gset_text_font_prec (Set text font and precision). And what does she do? She sets the text font and precision. That's it. That's the whole job. Iconic, lowkey, no notes. π
πΈ SYNOPSIS πΈ
#include <ncarg/gks.h>
void gset_text_font_prec(const Gtext_font_prec *text_font_prec);
yes bestie, one function, one pointer, one struct. slay.
π DESCRIPTION π
So you pass in a Gtext_font_prec struct and it has two fields you need to care about, and I'm gonna walk you through both like we're doing a vibe check together. π«Ά
text_font_prec.font
(Gint, Input) β this picks the text font that all your later calls to thegtextoutput primitive are gonna use. Here's the whole menu, no cap:
1β ASCII font (this is the default, the main character π)-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 important lore drop: the Hershey fonts are not standardized by GKS. They're locally implemented inside NCAR GKS-0A, and GKS literally requires that locally implemented fonts get assigned negative font numbers. That's why all the Hershey ones are negative, bestie, it's not a typo, it's the rules. π
wanna actually see the Hershey fonts? go look at the plots produced from the PLOTCHAR example β run "ncargex epltch" to get a metafile β and then examine the plot titled "PLCHHQ - FONTCAP DATABASES ADDED 6/90". The font numbers in that plot are the absolute values of the value for text_font_prec.font described up here. (PLOTCHAR doesn't have to follow the structures GKS imposes on font names for gset_text_font_prec, so it gets to be a little rebel about it. π)
text_font_prec.prec
(Input) β this one gives the precision used in later calls to thegtextoutput primitive, for the font type intext_font_prec.font. Options are:
GPREC_STRINGβ String precision (good). This is the GKS default.GPREC_CHARβ Character precision (better).GPREC_STROKEβ Stroke precision (best). This is the default for NCAR GSK-0A.
so like, good β better β best, we love a glow-up arc. β¨
π USAGE π
real talk, there's a difference depending on how you get to the Hershey fonts:
- 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, so choose wisely, bestie. it's giving "one tiny choice, big consequences." π
π¦ ACCESS π¦
to use the GKS C-binding routines, you gotta load the ncarg_gks and ncarg_c libraries. link them, don't ghost them. π₯
π 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
π COPYRIGHT π
Copyright (C) 1987-2009 University Corporation for Atmospheric Research The use of this Software is governed by a License Agreement.
bestie please actually read the license agreement, I'm begging π₯Ί legal stuff is real stuff.
okay that's the whole page, you ate it, you understood it, periodt. π
this was the GSET_TEXT_FONT_PREC(3NCARG) page from the NCAR GRAPHICS manual β the UNIX flavor, dated March 1993 β so shoutout to the vintage girlies who kept these docs alive. bye bestie, go stroke some characters π¦β¨πΈ
π¦ where this page comes from
- debian bookworm: libncarg-dev 6.6.2.dfsg.1-1
- debian trixie: libncarg-dev 6.6.2.dfsg.1-10+b2
- ubuntu jammy: libncarg-dev 6.6.2-10build2
- ubuntu questing: libncarg-dev 6.6.2.dfsg.1-10build2
- ubuntu resolute: libncarg-dev 6.6.2.dfsg.1-12
- ubuntu stonking: libncarg-dev 6.6.2.dfsg.1-12build2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms