Commit Graph

16 Commits

Author SHA1 Message Date
Michael Carlberg f3089e88f2 feat(conf): Properties for top/bottom radius #445 2017-03-21 14:49:33 +01:00
László Várady 701102d44b fix(cairo): Fix font prioritization
In the previous implementation, std::find() returned fns.end() several times,
which caused an "Address boundary error" in std::sort if the preferred
font-index was set to m_fonts.size() + 1.

This commit reimplements the font prioritization with a simple swap.

Reproduction steps:

- Start polybar with the following config:

  [bar/top]
  font-0 = NotoSans-Regular:size=8;0
  font-1 = MaterialIcons:size=10;0

  modules-left = date

  [module/date]
  type = internal/date
  date = %Y-%m-%d
  label-font = 3 ; invalid index
2017-01-29 15:16:00 +01:00
Michael Carlberg 3e4a4ce78f fix(renderer): Alignment blocks 2017-01-27 15:36:37 +01:00
Michael Carlberg 5283fbff01 fix(renderer): Fill background to the sub blocks
Paint the background on each sub block instead of the base surface.
Fixes the compositing ops.
2017-01-26 01:53:25 +01:00
Michael Carlberg d8d007aa9c refactor(cairo): Cleanup 2017-01-25 23:37:13 +01:00
Michael Carlberg f37ecfe959 fix(renderer): Falloff gradient 2017-01-25 15:00:34 +01:00
Michael Carlberg 14fb86ec70 refactor(cairo): Less greedy glyph matching
Only match glyphs for consecutive characters when
the default/preferred font is being tested.

Refs #374
2017-01-25 12:03:06 +01:00
Michael Carlberg c7f33e2567 refactor(renderer): Use redirection groups instead of pixmaps 2017-01-25 09:54:18 +01:00
Michael Carlberg d2eeac9b22 fix(cairo): Use font metrics as vertical baseline
Refs #372
2017-01-25 04:40:59 +01:00
Chase Geigle e7dc6b8bbb fix(renderer): Use proper font scaling based on DPI
This tries to mimic the old renderer's behavior as closely as possible.
In the absence of any information, DPI is assumed to be 96x96. DPI can
be configured on a per-bar basis using the configuration key "dpi".

To use the DPI configuration from Xresources (if built with support),
one can specify the following in the bar config:

dpi = ${xrdb:Xft.dpi:96}
2017-01-25 04:35:35 +01:00
Michael Carlberg 1a5246e940 refactor(cairo): Use shared_ptr for font list 2017-01-24 11:50:26 +01:00
Michael Carlberg 3e37b9ec8e fix(cairo): Increment textblock bg extents 2017-01-24 11:07:18 +01:00
Michael Carlberg 8b9461e63e wip(refactor): Cairo drawing 2017-01-24 07:41:46 +01:00
Michael Carlberg a59e115622 wip(refactor): Cairo drawing 2017-01-24 07:11:14 +01:00
Michael Carlberg 452afcdc68 refactor: Integral types 2017-01-24 07:11:14 +01:00
Michael Carlberg 5e1886a312 wip(refactor): Cairo drawing 2017-01-24 07:11:14 +01:00