brndnmtthws / brndnmtthws/conky

Separate layouting from rendering; render text on baseline

Open
#976 5 comments 6 reactions 0 assignees View on GitHub
feature priority: low rendering
Dominant language
C++
Stars
8.5k
Forks
666
PR merge metrics
No merged PRs in 30d

Description

**Information**
_Tested on conky `1.10.8` (I can't currently test it on the latest version) on Linux Slackware 64 `14.2`._

**Issue**

If a line begins with one font and then contains text with another font, a return to the original font causes a downward shift.

Here is a minimal example of conky configuration file which reproduces here the issue:

```lua
conky.config = {
use_xft= true,
font= 'DejaVu Sans:style=medium:size=9'
}
conky.text = [[
# Four examples
AAAA${font Symbola}💗${font}AAAA
AAAA${font FontAwesome}${font}AAAA
AAAA${font Comic Sans Ms}(Sorry)${font}AAAA
AAAA${font DejaVu Sans}[Test]${font}AAAA
]]
```
Is seems like the line-height of the middle text is kept after `${font}`. A screenshot (PNG) of the result is attached. The bug is not reproduced if `font` entry is omitted in `conky.config` object, and may not reproduce with some values of `font`.

![conky-result](https://user-images.githubusercontent.com/7393789/85049340-d67cca00-b194-11ea-85b5-08e8b825b21e.png)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by running the minimal conky configuration from the issue and compare the font transitions around each `${font}` reset. Trace the layout and rendering entry points responsible for line height and baselines; done means the original font resumes without a downward shift while the other examples continue to render correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, lua
Domain
computer-graphics, desktop
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.