Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(11890)

Issue 582010043: Issue 3778: Use bounding box as skylines for markup in svg backend (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
4 years ago by barrykp
Modified:
3 years, 12 months ago
Reviewers:
Ebe123, lemzwerg, hahnjo, hanwenn
CC:
lilypond-devel_gnu.org
Visibility:
Public.

Description

Issue 3778: Use bounding box as skylines for markup in svg backend As there is no routine for determining skylines for utf-8-string stencils, they normally fall back to the grob's bounding box, which is fine. However, when there is a mixture of utf-8-string and other types of stencil (which have associated skyline functions) in a single grob, the entire grob gets a skyline determined only from the non-utf-8-string stencils. This sometimes causes the text portion of such mixed grobs (e.g. metronome marks) to collide with other grobs. While looping over the stencils, check for utf-8-string and if found, clear the skylines and break out of the loop. Empty skylines forces a fallback to the grob's bounding box, which restores the behaviour from before the patch to improve skyline approximations (issue 2148). This does not fix the issue that there is no routine for determining skylines for utf-8-strings when the backend is svg, but it does at least remove the collisions without changing the behaviour in non-broken situations. Add a suitable (svg backend) regression test.

Patch Set 1 #

Patch Set 2 : Remove regression test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+9 lines, -1 line) Patch
M lily/stencil-integral.cc View 1 chunk +9 lines, -1 line 0 comments Download

Messages

Total messages: 14
lemzwerg
LGTM
4 years ago (2020-04-29 04:54:36 UTC) #1
barrykp
Remove regression test
4 years ago (2020-04-29 08:19:39 UTC) #2
hanwenn
please don't submit; I'm rearranging this file completely. Can you add your regression test + ...
3 years, 12 months ago (2020-05-02 07:25:16 UTC) #3
barrykp
On Sat, May 02, 2020 at 12:25:15AM -0700, hanwenn@gmail.com wrote: > please don't submit; I'm ...
3 years, 12 months ago (2020-05-02 07:34:29 UTC) #4
hanwenn
On 2020/05/02 07:34:29, barrykp wrote: > On Sat, May 02, 2020 at 12:25:15AM -0700, mailto:hanwenn@gmail.com ...
3 years, 12 months ago (2020-05-02 07:37:31 UTC) #5
hanwenn
On 2020/05/02 07:37:31, hanwenn wrote: > On 2020/05/02 07:34:29, barrykp wrote: > > On Sat, ...
3 years, 12 months ago (2020-05-02 07:38:58 UTC) #6
hahnjo
On 2020/05/02 07:25:16, hanwenn wrote: > please don't submit; I'm rearranging this file completely. Do ...
3 years, 12 months ago (2020-05-02 07:46:15 UTC) #7
hanwenn
Not necessarily, but the refactoring means I'll likely have to overwrite the fix wholesale. Because ...
3 years, 12 months ago (2020-05-02 07:59:30 UTC) #8
Ebe123
On 2020/05/02 07:38:58, hanwenn wrote: > I don't completely understand, though: if we put the ...
3 years, 12 months ago (2020-05-02 08:16:30 UTC) #9
barrykp
On Sat, May 02, 2020 at 01:16:30AM -0700, beauleetienne0@gmail.com wrote: > On 2020/05/02 07:38:58, hanwenn ...
3 years, 12 months ago (2020-05-02 08:46:46 UTC) #10
barrykp
On Sat, May 02, 2020 at 09:59:18AM +0200, Han-Wen Nienhuys wrote: > Not necessarily, but ...
3 years, 12 months ago (2020-05-02 08:53:55 UTC) #11
hanwenn
Let me see what I can come up with today On Sat, May 2, 2020 ...
3 years, 12 months ago (2020-05-02 09:04:50 UTC) #12
hanwenn
See http://codereview.appspot.com/545970043 note: 1) Depending on the renderer, the skylines diverge from the text. Inkscape ...
3 years, 12 months ago (2020-05-02 09:54:27 UTC) #13
barrykp
3 years, 12 months ago (2020-05-02 10:35:22 UTC) #14
I will close this rietveld issue now that you are taking care of it.

Whatever discussion needs to take place can happen at the one you have
opened.

On Sat, May 02, 2020 at 11:54:14AM +0200, Han-Wen Nienhuys wrote:
> See http://codereview.appspot.com/545970043
> 
> note:
> 1) Depending on the renderer, the skylines diverge from the text.
> Inkscape reproduces exactly, but EOG messes up the text formatting.
> 
> 2) The lack of regression testing is worrying. We could have a section
> of regtests that is powered by
> 
>  inkscape --export-background-opacity=1.0  --export-background=white
> --export-type="png" svg.cropped.svg
> 
> and then do imagemagick diffs on the result.
> 
> On Sat, May 2, 2020 at 10:53 AM Kevin Barry <barrykp@gmail.com> wrote:
> >
> > On Sat, May 02, 2020 at 09:59:18AM +0200, Han-Wen Nienhuys wrote:
> > > Not necessarily, but the refactoring means I'll likely have to
> > > overwrite the fix wholesale. Because there is no regtest, it willl
> > > depend on my diligence anyway to fix this again.
> >
> > OK, so what should we do? I am happy to take responsibility for making
> > sure it stays fixed after your work (even if that means another patch),
> > but if there's some way I can rebase it off your work that would be fine
> > too.
> 
> 
> 
> -- 
> Han-Wen Nienhuys - hanwenn@gmail.com - http://www.xs4all.nl/~hanwen
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b