XSetFontPath(3)
π XSetFontPath(3) β XLIB FUNCTIONS π
πΈ NAME πΈ
okay so the trio is XSetFontPath, XGetFontPath, and XFreeFontPath β they set, get, or free the font search path. periodt. π
β¨ SYNTAX β¨
int XSetFontPath(Display *display, char **directories, int ndirs);
char **XGetFontPath(Display *display, int *npaths_return);
int XFreeFontPath(char **list);
π ARGUMENTS π
directoriesβ tells the X server the directory path used to look for a font. Set the path to the empty list and it restores the default path defined for the X server. π«Άdisplayβ the connection to the X server. classic.listβ the array of strings you want to free.ndirsβ the number of directories in the path.npaths_returnβ returns the number of strings in the font path array.
π¦ DESCRIPTION π¦
okay so XSetFontPath defines the directory search path for font lookup. huge vibe check: there is only one search path per X server, not one per client. the encoding and interpretation of the strings are implementation-dependent, but typically they specify directories or font servers to be searched in the order listed. an X server is permitted to cache font information internally β for example, it might cache an entire font from a file and not check on subsequent opens of that font to see if the underlying font file has changed. but hereβs the guaranteed part: when the font path is changed, the X server is guaranteed to flush all cached information about fonts for which there currently are no explicit resource IDs allocated. the meaning of an error from this request is implementation-dependent. π
XSetFontPath can generate a BadValue error.
XGetFontPath allocates and returns an array of strings containing the search path. the contents of these strings are implementation-dependent and are not intended to be interpreted by client applications. when it is no longer needed, the data in the font path should be freed by using XFreeFontPath. π§
XFreeFontPath frees the data allocated by XGetFontPath.
π DIAGNOSTICS π
BadValueβ a numeric value is outside the range of values accepted by the request. unless a specific range is specified for an argument, the full range defined by the argumentβs type is accepted. any argument defined as a set of alternatives can generate this error.
π SEE ALSO π
XListFont(3),XLoadFonts(3)Xlib - C Language X Interface
signed off with X Version 11, libX11 1.8.14, and the XSetFontPath(3) energy π β no date is listed on this page, so iβm not inventing one, bestie. π«Ά
π¦ where this page comes from
- alpine 3.24: libx11-doc 1.8.14-r0 Β· X11
- arch rolling: libx11 1.8.14-1 Β· MIT AND X11
- nixos 26.05: libx11 1.8.14
- nixpkgs unstable: libx11 1.8.14
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms