Go to the source code of this file.
◆ css_unit_ctx
LibCSS unit conversion context.
The client callback is optional. It is used for measuring "ch" (glyph '0' advance) and "ex" (height of the letter 'x') units. If a NULL pointer is given, LibCSS will use a fixed scaling of the "em" unit.
◆ css_unit_len_measure
Client callback for font measuring.
- Parameters
-
| [in] | pw | Client data. |
| [in] | style | Style to measure font for, or NULL. |
| [in] | unit | Either CSS_UNIT_EX, or CSS_UNIT_CH. |
- Returns
- length in CSS pixels.
◆ css_unit_font_size_len2pt()
Convert a length to points (pt).
- Parameters
-
| [in] | style | Style to perform conversion for or NULL. |
| [in] | ctx | Length unit conversion context. |
| [in] | length | Length to convert. |
| [in] | unit | Current unit of length. |
- Returns
- A length in points.
◆ css_unit_len2css_px()
Convert a length to CSS pixels.
- Parameters
-
| [in] | style | Style to perform conversion for or NULL. |
| [in] | ctx | Length unit conversion context. |
| [in] | length | Length to convert. |
| [in] | unit | Current unit of length. |
- Returns
- A length in CSS pixels.
◆ css_unit_len2device_px()
Convert a length to device pixels.
- Parameters
-
| [in] | style | Style to perform conversion for or NULL. |
| [in] | ctx | Length unit conversion context. |
| [in] | length | Length to convert. |
| [in] | unit | Current unit of length. |
- Returns
- A length in device pixels.