opentype.js icon indicating copy to clipboard operation
opentype.js copied to clipboard

Rotation of Glyphs

Open rvilarl opened this issue 2 years ago • 2 comments

VexFlow uses OTF fonts including SMUFL glyphs. I have suggested to use OpenType.js for rendering, but some glyphs require a 90° rotation. See https://github.com/w3c/smufl/issues/218#issuecomment-1146567666 See https://www.smufl.org/version/latest/range/multiSegmentLines/

Expected Behavior

A method should be provided to rotate the glyphs. (I am not an expert, perhaps there is already a way to do this, that I do not know)

Possible Solution

Glyph functions might include an additional optional parameter to indicate the rotation angle.

Context

I need to render the multi segment lines from SMUFL fonts vertically. See https://www.smufl.org/version/latest/range/multiSegmentLines/

Your Environment

  • Version used: 1.1.3
  • Font used: https://github.com/steinbergmedia/bravura/blob/master/redist/otf/Bravura.otf
  • Browser Name and version: Google Chrome 102.0.5005.61 (Build oficial) (64 bits)
  • Operating System and version (desktop or mobile): Linux (Fedora 35)
  • Link to your project: https://github.com/0xfe/vexflow/issues/1399

rvilarl avatar Jun 06 '22 07:06 rvilarl

Ok it seems that it is not supported. I saw the comment in the code

// TODO rotation and stretch currently not supported

Any plan to support it?

rvilarl avatar Jun 07 '22 05:06 rvilarl

No plan here, but a PR is always welcome :)

yne avatar Jul 17 '22 19:07 yne