Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[why] The overlap formula seems to be off sometimes. Although the shift is correct (and thus the number of 'pixels' that overlap), but the non overlapping part of the glyph is often not as wide as expected, off by up to some percent. [how] The formula is too simple. It just calculates an additional scale factor on top of the already existing factor. To get it 'pixel perfect' we need to calculate first how much the glyph fills the cell - because we want the overlap to be in 'cell percent' and not 'glyph percent'. That might be sometimes the same (if the cell is filled completely), but usually it is not completely full, and that means the overlap will be smaller than intended. [note] To get the current glyph bounding box we pull some lines up in the code that get the 'dim' variable. Also use float constants to calculate with float variables. Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
- Loading branch information