Commit graph

16 commits

Author SHA1 Message Date
Daniel Eklöf
307a1f5ec8 particles: all particles can have a decoration 2019-01-13 11:16:52 +01:00
Daniel Eklöf
47018104da particles: compile as shared libraries (plugins) 2019-01-13 11:13:47 +01:00
Daniel Eklöf
7b98ea2b7c particle/string: expose info through the new struct particle_info struct 2019-01-13 10:49:10 +01:00
Daniel Eklöf
f6977417e0 font: use font-config to load font
This allows us to a) move away from cairo's "toy" API, and b) let the
user specify font options in a single font "name" string:

  Serif:size=10:weight=bold:slant=italic

This also allows us to simplify the font code significantly (except
for the fontconfig parts...); the font no longer sets itself in a
cairo surface - font users do that; the font simply returns a
cairo_scaled_font_t.

Furthermore, font_clone() has now been simplified to basically just
refcount the scaled font. I.e. there's no need to run the full
constructor and lookup and instantiate the cairo scaled font again.
2019-01-09 18:50:16 +01:00
Daniel Eklöf
22507ae26c particle: add utility function to render a particle's decoration 2018-12-29 21:00:03 +01:00
Daniel Eklöf
7da09530b8 particle/string: tags_expand_template() now returns NULL if template is NULL 2018-12-29 17:12:11 +01:00
Daniel Eklöf
85801a5deb particle/string: expand on_click handler before passing to exposable 2018-12-29 17:10:10 +01:00
Daniel Eklöf
ab67d036ae tags: break out string formatting from particle/string 2018-12-29 17:03:41 +01:00
Daniel Eklöf
9e5dbfe27d particle/string: constructor now takes an 'on_click_template' 2018-12-29 14:38:10 +01:00
Daniel Eklöf
e8d8bf70d3 exposable: add a "common" constructor and default destructor 2018-12-29 12:51:31 +01:00
Daniel Eklöf
3aa6b21056 particle/string: call particle_default_destroy() 2018-12-26 21:35:39 +01:00
Daniel Eklöf
ce68bdb59d exposable: add a 'width' member, set (at latest) in begin_expose() 2018-12-26 16:37:11 +01:00
Daniel Eklöf
1c9a908a8f particle/string: draw decoration, if available 2018-12-26 15:31:49 +01:00
Daniel Eklöf
44a2dbb201 tag: rename tag.value() -> tag.as_string() 2018-11-18 11:02:21 +01:00
Daniel Eklöf
24313ea75a particle/string: take font's y_offset into account 2018-11-17 17:13:21 +01:00
Daniel Eklöf
8bf8a398b9 initial commit: wip 2018-11-17 11:30:33 +01:00