GithubHelp home page GithubHelp logo

Shape notes: Help defining glyphs about abcm2ps HOT 6 OPEN

torotil avatar torotil commented on July 23, 2024
Shape notes: Help defining glyphs

from abcm2ps.

Comments (6)

moinejf avatar moinejf commented on July 23, 2024

Hi,
In the <defs>, you can add an other class:

<path id="fablupo" d="m-3.5 -2.9l7.2 0 0 5.8z" class="stroke stw"/>

Then, the class could be defined in a <style> that would contain all the attributes you want, including stroke-width:

<style> .stw {stroke-width: 1.4} </style>

I updated the shape example (care, the file extension has changed from xhtml to html):

http://moinejf.free.fr/abcm2ps-doc/shape.html

But, this does not work with the PostScript output of abcm2ps.
Instead, you have to redefine manually the PS functions fablupo, fabldno...

from abcm2ps.

torotil avatar torotil commented on July 23, 2024

But, this does not work with the PostScript output of abcm2ps.

I was talking about the PS output. Funnily the instructions (as in the new example) do work just fine for PS output, except for the styles.

Instead, you have to redefine manually the PS functions fablupo, fabldno...

Could you give me pointers on how to find out how to do this?

from abcm2ps.

moinejf avatar moinejf commented on July 23, 2024

I looked in the code of abcm2ps and, you're lucky, the stroke width may be defined in the %%beginsvg definitions by
style="stroke-width:1.4"
after the class.
I updated the shape example
http://moinejf.free.fr/abcm2ps-doc/shape.html

from abcm2ps.

torotil avatar torotil commented on July 23, 2024

That’s great thanks. For fine-tuning this further (aligning staff with head, having different stroke widths for horizontal / vertical lignes …) etc. I’d still need more control over this. I don’t think a blind trial-error approach will allow this. Is there anything I that you can point me at that would help me? (I am a software developer so reading C code is not entirely beyond me).

from abcm2ps.

moinejf avatar moinejf commented on July 23, 2024

Well, abcm2ps can do both PostScript (PS) and SVG. For SVG, it contains a small PS interpreter, so, the SVG output is rather odd.

Now that abcm2ps does not evolve anymore, it is replaced by abc2svg which does only SVG output.
There are bridges between PS and SVG in both programs. So, some of the %%beginsvg..%%endsvg definitions are understood by abcm2ps, and some of the %%beginps..%%endps definitions are understood by abc2svg.

As it seems that your better like PS output, you should use %%beginps..%%endps and have a fine definition of the graphical output. The PostScript language is defined in the Adobe document PLRM3.pdf.

For the shape notes, the move from SVG to PS is easy enough: with abcm2ps, generate a simple ABC tune with the SVG definitions, and, then, looking at the generated PS file, you will see the functions /fablup, /fablupo ... (these functions have been generated from the SVG definitions).

You can then move these PS functions to your ABC tune between %%beginps and %%endps, and remove the %%beginsvg .. %%endsvg sequence. The result shoud be the same.

from abcm2ps.

torotil avatar torotil commented on July 23, 2024

Thanks for writing this up! It’s very useful.

I didn’t realise that abcm2ps was being phased out. Being more fluent in SVG than PS, this might indeed be a good opportunity for me to attempt a switch instead of investing more into abcm2ps.

from abcm2ps.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.