1
0
Fork 0
mirror of https://github.com/polybar/polybar.git synced 2024-11-25 13:55:47 -05:00
polybar/include/cairo
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
..
context.hpp fix(cairo): Fix font prioritization 2017-01-29 15:16:00 +01:00
font.hpp refactor(cairo): Less greedy glyph matching 2017-01-25 12:03:06 +01:00
fwd.hpp wip(refactor): Cairo drawing 2017-01-24 07:11:14 +01:00
surface.hpp wip(refactor): Cairo drawing 2017-01-24 07:41:46 +01:00
types.hpp refactor(cairo): Cleanup 2017-01-25 23:37:13 +01:00
utils.hpp refactor(cairo): Cleanup 2017-01-25 23:37:13 +01:00