JWM Source Documentation
font.h File Reference
Header for the font functions. More...
#include "color.h"Go to the source code of this file.
Enumerations | |
| enum | FontType { FONT_BORDER, FONT_MENU, FONT_TASK, FONT_POPUP, FONT_CLOCK, FONT_TRAY, FONT_TRAYBUTTON, FONT_PAGER, FONT_COUNT } |
| Enumeration of different components that use fonts. More... | |
Functions | |
| void | InitializeFonts () |
| void | StartupFonts () |
| void | ShutdownFonts () |
| void | DestroyFonts () |
| void | SetFont (FontType type, const char *value) |
| Set the font to use for a component. | |
| void | RenderString (Drawable d, FontType font, ColorType color, int x, int y, int width, Region region, const char *str) |
| Render a string. | |
| int | GetStringWidth (FontType type, const char *str) |
| Get the width of a string. | |
| int | GetStringHeight (FontType type) |
| Get the height of a string. | |
Detailed Description
Enumeration Type Documentation
| enum FontType |
Function Documentation
| void DestroyFonts | ( | ) |
| int GetStringHeight | ( | FontType | type | ) |
Get the height of a string.
- Parameters:
-
type The font used to determine the height.
- Returns:
- The height in pixels.
| int GetStringWidth | ( | FontType | type, |
| const char * | str | ||
| ) |
Get the width of a string.
- Parameters:
-
type The font used to determine the width. str The string whose width to get.
- Returns:
- The width of the string in pixels.
| void InitializeFonts | ( | ) |
| void RenderString | ( | Drawable | d, |
| FontType | font, | ||
| ColorType | color, | ||
| int | x, | ||
| int | y, | ||
| int | width, | ||
| Region | region, | ||
| const char * | str | ||
| ) |
Render a string.
- Parameters:
-
d The drawable on which to render the string. font The font to use. color The text color to use. x The x-coordinate at which to render. y The y-coordinate at which to render. width The maximum width allowed. region A clip region (may be None). str The string to render.
| void SetFont | ( | FontType | type, |
| const char * | value | ||
| ) |
Set the font to use for a component.
- Parameters:
-
type The font component. value The font to use.
| void ShutdownFonts | ( | ) |
| void StartupFonts | ( | ) |