aboutsummaryrefslogtreecommitdiff
path: root/common/pango.c
AgeCommit message (Collapse)Author
2019-01-16Use static arrays where possible.Connor E
2019-01-16Remove usage of VLAs.Connor E
2018-10-17Fix stringop-overflow warningsNiccolò Scatena
2018-10-16Truncate message, append buffer overflow message if too long.Connor E
Increase buffer size, remove macros. Make variables lowercase. Some more feedback.
2018-09-22Call pango_cairo_context_set_font_options().Geoff Greer
Call pango_cairo_context_set_font_options() before pango_cairo_update_layout() and pango_cairo_show_layout(). By default, Pango "merges" the Cario font options with its own, which doesn't enable full hinting.
2018-09-22Use pango_layout_set_text instead of pango_layout_set_markupRyan Dwyer
2018-09-22Fix pango escaping and refactor escape_markup_textRyan Dwyer
Fixes #2674. The cause of the issue was in get_pango_layout. When we call pango_parse_markup, `text` is the escaped string, and the unescaped string is then computed and written to `buf`. We were then passing the unescaped string to pango_layout_set_markup, but this function needs the escaped string. `buf` is not needed and has been removed. The other part of this PR refactors escape_markup_text to remove the dest_length argument and removes the -1 return value on error. It now assumes that you've allocated dest to the correct length.
2018-09-08Align titles to baselineRyan Dwyer
This does the following: * Adds a baseline argument to get_text_size (the baseline is the distance from the top of the texture to the baseline). * Stores the baseline in the container when calculating the title height. * Takes the baseline into account when calculating the config's max font height. * When rendering, pads the textures according to the baseline so they line up.
2018-07-09Update for swaywm/wlroots#1126emersion
2018-05-16Change scale from int32_t to double for pangoBrian Ashworth
2018-05-13Fix pango markupemersion
The condition checking if the markup is valid was inverted. This commit also adds better error handling: if the markup cannot be parsed, it fallbacks to plain text.
2018-05-13Fix crash when using pango markup fontHeghedus Razvan
The characters & < > ' " needs to be escaped when using pango markup Signed-off-by: Heghedus Razvan <heghedus.razvan@gmail.com>
2018-04-02Fix use-after-free with block hotspotsDrew DeVault
2018-03-29Use statically allocated text bufferDrew DeVault
2018-03-29Start port of swaybar to layer shellDrew DeVault
This starts up the event loop and wayland display and shims out the basic top level rendering concepts. Also includes some changes to incorporate pango into the 1.x codebase properly.