|
NetSurf
|
HTML internal font handling implementation. More...
#include "utils/nsoption.h"#include "netsurf/plot_style.h"#include "css/utils.h"#include "html/font.h"Go to the source code of this file.
Functions | |
| static plot_font_generic_family_t | plot_font_generic_family (enum css_font_family_e css) |
| Map a generic CSS font family to a generic plot font family. More... | |
| static int | plot_font_weight (enum css_font_weight_e css) |
| Map a CSS font weight to a plot weight value. More... | |
| static plot_font_flags_t | plot_font_flags (enum css_font_style_e style, enum css_font_variant_e variant) |
| Map a CSS font style and font variant to plot font flags. More... | |
| void | font_plot_style_from_css (const css_unit_ctx *unit_len_ctx, const css_computed_style *css, plot_font_style_t *fstyle) |
| Populate a font style using data from a computed CSS style. More... | |
HTML internal font handling implementation.
Definition in file font.c.
| void font_plot_style_from_css | ( | const css_unit_ctx * | unit_len_ctx, |
| const css_computed_style * | css, | ||
| struct plot_font_style * | fstyle | ||
| ) |
Populate a font style using data from a computed CSS style.
| unit_len_ctx | Length conversion context |
| css | Computed style to consider |
| fstyle | Font style to populate |
Definition at line 135 of file font.c.
References plot_font_style::background, plot_font_style::families, plot_font_style::family, plot_font_style::flags, plot_font_style::foreground, nscss_color_to_ns, nsoption_int, plot_font_flags(), plot_font_generic_family(), plot_font_weight(), PLOT_STYLE_SCALE, plot_font_style::size, and plot_font_style::weight.
Referenced by default_mouse_action(), form_open_select_menu(), html_redraw_file(), html_redraw_text_box(), html_selection_drag_end(), layout_block_context(), layout_line(), layout_lists(), layout_minmax_line(), mouse_action_drag_selection(), and selection_copy_box().
|
static |
Map a CSS font style and font variant to plot font flags.
| style | CSS font style |
| variant | CSS font variant |
Definition at line 117 of file font.c.
References FONTF_ITALIC, FONTF_NONE, FONTF_OBLIQUE, and FONTF_SMALLCAPS.
Referenced by font_plot_style_from_css().
|
static |
Map a generic CSS font family to a generic plot font family.
| css | Generic CSS font family |
Definition at line 38 of file font.c.
References PLOT_FONT_FAMILY_CURSIVE, PLOT_FONT_FAMILY_FANTASY, PLOT_FONT_FAMILY_MONOSPACE, PLOT_FONT_FAMILY_SANS_SERIF, and PLOT_FONT_FAMILY_SERIF.
Referenced by font_plot_style_from_css().
|
static |
Map a CSS font weight to a plot weight value.
| css | CSS font weight |
Definition at line 70 of file font.c.
Referenced by font_plot_style_from_css().