GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
AG_FONT_SELECTOR(3) FreeBSD Library Functions Manual AG_FONT_SELECTOR(3)

AG_FontSelectoragar font selection widget

#include <agar/core.h>
#include <agar/gui.h>

AG_FontSelector allows the user to select a specific font from parameters such as family (face), size and style options. Types listed include:

  • Compiled-in fonts (fonts statically built into libag_gui).
  • Agar core fonts, application-specific and user fonts obtained by scanning the font path (the AG_CONFIG_PATH_FONTS setting of AG_Config(3)) for recognized extensions (.otf .ttf .ttc .woff2 .woff .dfont .fnt .bmp or .png).
  • System fonts (obtained via fontconfig where available).

AG_Object(3) -> AG_Widget(3) -> AG_FontSelector.

AG_FontSelector *
(AG_Widget *parent, Uint flags);

The () function allocates, initializes, and attaches a new AG_FontSelector widget. Acceptable flags include:

AG_FONTSELECTOR_ALT_PHRASE
Select a different text string for preview.
AG_FONTSELECTOR_HFILL
Expand horizontally in parent container.
AG_FONTSELECTOR_VFILL
Expand horizontally in parent container.
AG_FONTSELECTOR_EXPAND
Shorthand for AG_FONTSELECTOR_HFILL | .

The AG_FontSelector widget provides the following bindings:

AG_Font **font
Pointer to an AG_Font(3) pointer which will be modified according to the user's selection.

The AG_FontSelector widget does not generate any event.

The following code fragment creates a new window containing a AG_FontSelector widget:

AG_Window *win;
AG_FontSelector *fs;
AG_Font *myFont;

win = AG_WindowNew(0);
fs = AG_FontSelectorNew(win, AG_FONTSELECTOR_EXPAND);
myFont = AG_TextFontPct(150);
AG_BindPointer(fs, "font", (void **)&myFont);
AG_WindowShow(win);

AG_Intro(3), AG_Text(3), AG_Widget(3), AG_Window(3)

The AG_FontSelector widget first appeared in Agar 1.3.4.

December 21, 2022 Agar 1.7

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.