This does not work although I think it is clear what the required conditions are, and how they would be met.
Would it be possible to implement this? Or is there another trick I could use?
There are multiple cases in which this would be helpful, like mathematical operators: they would (almost) all be centered within a given width, which could, for example, be adopted from plus.
You mean, I need two additional glyphs only to achieve the spacing? Sounds too complicated.
Thanks, this looks very useful. However, I’d prefer a set-up-once-and-forget type of solution.
Why not implement this specific (but frequently useful) case of sidebearing formula set-up in Glyphs? That would be much simpler: no additional glyphs, no script I need to run (and remember to re-run), just logical, as-expected behaviour of the sidebearing formulas.
If I got Rainer right, he’s talking about having a component for the slash, and build oslash from o and this component ?
This is how I do it as well, I have non exportable glyphs for all my slashes, bars etc and build my components glyphs with these and appropriates anchors, then auto align everything.
For maths operators (that we usually want on tabular figures width), I just have a simple script like:
myLayers = Glyphs.font.selectedLayers
glyphWidth = your desired width
for thisLayer in myLayers:
thisLayer.LSB = thisLayer.LSB-(int(thisLayer.width-glyphWidth)/2)
thisLayer.width = glyphWidth
I thought using a glyph named o.oslash implies an additional glyph that contains only the o used in the ø. This is necessary as that o needs to be adjusted (somewhat lighter, especially where the slash crosses it), especially in the bolder or condensed weights. Simply using the normal o with a slash is not good enough for me, I am afraid.
Thank you for sharing this but, as I mentioned, I’d prefer to use the built-in tools (not that I didn’t know how to make Glyphs add-ons ;), and a set up that does not require to re-run a script every now an then as this is easy to forget.
I am not asking for a new Glyphs feature, and I am not trying to use a hack. Simply expected behaviour if it was implemented in Glyphs. The solution from my original post would be the most convenient, simple and logical one, I believe.
They are easy to set up: Just select the o part, right click and choose Component from Selection, then type the name ‘o.oslash’, click OK. Then the same thing with the slash part. It automatically does this for all masters.
Excellent! This is, of course, the ideal solution for the ø, better than two additional glyphs, and better (somewhat more robust) than my proposal. I have already used it other contexts as well.
However, that still does not solve the case of the math punctuation. Sorry, I really reject the idea of having to run a script, without auto-updating, if an solution using sidebearing formulas is thinkable.
I am really surprised at the resistance against my suggestion to implement that logical, as-expected behaviour of the sidebearing formulas. @mekkablue Why are you so opposed to it? You have not given any reasons why using sidebearing formulas in the way I described is not a good idea, and why your script works better.
Just in case someone stumbles across this and wonders why this doesn’t work by pressing the cicular-arrow buttons: If you have a formula for the advance width and =| for a sidebearing then you need to use “Update Metrics” for it to work.