Skip to content
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

Rescaling the resulting SVGs? (e.g. zooming in) #20

Open
aldanor opened this issue Oct 17, 2022 · 3 comments
Open

Rescaling the resulting SVGs? (e.g. zooming in) #20

aldanor opened this issue Oct 17, 2022 · 3 comments

Comments

@aldanor
Copy link

aldanor commented Oct 17, 2022

Wonder if there's an easy CSS hack to zoom all of the abc.js output by a certain %? (on some monitors, those can appear quite tiny - and while it's possible to rescale Obsidian's UI font and editor font size, it's not obvious how to do that with abc)

Thanks :)

@TilBlechschmidt
Copy link
Collaborator

I do not think it is possible with just CSS as it would not change the layout of the sheet and thus either overflow the page boundary (with the edges cut off) or become too crammed (when increasing just the text size). There is a scale option for abc.js but at least in the Obsidian context it does not appear to do anything:

```music-abc
{
  "scale": 2
}
---
X:1
T: Cooley's
M: 4/4
L: 1/8
R: reel
K: G
|:D2|EB{c}BA B2 EB|~B2 AB dBAG|FDAD BDAD|FDAD dAFD|
```

Though that might be an avenue to explore further. Maybe a combination of the other options might work too.

@aldanor
Copy link
Author

aldanor commented Oct 17, 2022

Hmm, looks like removing/overriding "resize":"responsive" allows scale to work – but that's not really the same thing, because as you said - it gets cut on the right side boundary if there's not enough space.

It would be nice to keep it responsive but just give it a bigger "maximum normal size", wherever that is actually defined...

image

@paulrosen
Copy link

The "responsive" item makes the music as large as possible to fit the surrounding container, so making the surrounding container larger will make the music larger. And it isn't compatible with zoom because it will override whatever zoom you've picked. You can change the %%staffwidth. If the width is smaller then the responsive setting will make the whole thing bigger. You could also play around with wrapping if staffwidth almost works but makes the music too crowded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants