-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Distorted ABC (SVG) score snippets #399
Comments
It's a bug introduced recently when I added independent h/v scaling. I'll fix it. |
Fixed in 6.050_099. |
Oh, that's odd. I'd already tried removing the No problem with 6.050, only dev version (including 6.050_100). Same behaviour using Seems like the difference might be my system. Does anything look outdated in my
|
My guess is that you have a small(er) page width (columns?). This causes the comment line
to wrap into
Now the Peculiar, in my test it is the scaled image that is ok and the non-scaled that goes wrong. I really really REALLY must revise the wrapping algorithms. |
I don't think it's wrapping, although that was my first thought when I saw I've stripped the test sample down to the However, two interesting observations arise (with dev):
Possibly I'm not understanding I'll continue experimenting with this, though, because differences between your and my experiences suggest there's maybe something system-specific about it. |
On second thoughts (re-reading documentation), I think maybe However, the very small image resulting from 76% Not sure if it's directly related, but a similar area of functionality, so I explored the image_scaling.cho.txt
|
It is even documented for # Specifies the desired width of the image in typographic points (1/72 inch or 0.3528 mm), or a percentage of the available width. In the case of
There is a The problem with the /> wrapped to the next line seems to be gone in Text::Layout 0.037_004. Does this explain most (all?) of the anomalities? |
OK, that explains the small image resulting from I suppose there's a potential use case for inserting small graphical symbols as part of text, where percentage values are more adaptable than point sizes, e.g. repurposing the same song source for both regular and 'large type' versions. Maybe it just needs a documentation note to make clear that it's a percentage of character size (not available page/column space)? Sorry: my failure to notice that I'd already set However, I notice that principle seems true only for Yes, if wrapping of |
For the time being I will disable recognition of percentages in It is easy to add the development version of Text::Layout:
ChordPro 6.050_102 + Text::Layout 0.037_006 should do it better. |
Thanks Johan, Text::Layout (and ChordPro) both updated successfully, which seems to address the main issue of One very minor observation. If the asset is scaled when it's defined (in image_scaling.cho.txt gives image_scaling.cho.pdf With It's only a minor inconsistency, and shouldn't really arise (much). I can't think of a good case for needing to scale an asset both at its original definition and when it's used/inserted (although each of those is useful in itself). My only reason for reiterating |
Good observation. I will address that later when it's less hot in here. |
It turns out that the way I tried to support this screws up other things. Since it only applies to ABC images, wouldn't it be better to use
Later, when I have cleaned up the image handling, I can add official support for
Spread images are screwed up as well, no need to investigate/report. |
Ah, ok. For clarity, do you mean support for consistent That's quite a marginal issue, so maybe simplest to leave it inconsistent for the time being. A few reasons for not relying on
If you expect to look at this in the longer term anyway, I think maybe better that short-term solution is a bit of inconsistency for very niche cases, rather than changing the main (non-asset) |
My "I think I fixed it, please confirm" mail got lost ☹. Note that the spread images have not been addressed yet. |
Sorry for slow response. Using 6.050_107, I can confirm that With your samples, I now get the same output results, and output from my own production songs looks as expected. |
However, one possible new glitch crops up. With a couple of ABC scores placed using
I'm now getting errors (and warning image on PDF page):
Oddly, the message occurs 4 times, even though 2 Seems to work nicely if Perhaps this is like removing percentage height/width in If this isn't intended, it's maybe a small issue. If intended, might need a slight documentation update: beta docs still mention percentages as valid for |
The message is intentional for the reasons that you already noticed. I thouch I fixed all occurrences in the docs but I'll recheck. That the message occurs twice is because the content is evaluated twice. First to obtain its dimensions to see if it fits, and then again for the actual placement. That is one of the things I want to straighten out in a future version. |
It's conceivable that my browser still had the old page cached. I've lost the habit of refreshing manually. Doc page looks clearer now, but a redundant close parenthesis ) at the end of the dx=NNN entry. Minor, but could confuse, given the preceding "(in points)" parentheses. |
Good catch. Thanks. |
I've a few songs in my collection for which ABC score snippets have become distorted (vertically stretched) with 6.050_096 (possibly earlier, but not something I was checking).
Previously:
Now:
From source:
I have several score snippets now exhibiting the same behaviour, and the common factor seems to be that all are quite long, so I have to tweak ABC
%%
settings or ChordProscale
to fit a single page width and achieve consistent staff height across all songs. Short scores (less than a page width) don't seem to be affected.debug.abc
output isAt a quick check, Firefox seems to display the temporary SVG with correct (unstretched) proportions. This is it:
I recall previous discussion that ChordPro default scaling for ABC SVG is to fit page width, so I'm wondering if a recent change has affected that scaling so it's only scaling the width, and not the height, of the inserted SVG?
The text was updated successfully, but these errors were encountered: