Arrows using dlig feature

daverowland's picture

Wondering whether there is a standard on the typed combinations that go to make arrows using discretionary ligatures. For the following arrows:


I'm thinking the following combinations:
{<-}
{^|}
{->}
{|v}
{<->}
{^|v}
{<^}
{^>}
{v>}
{< v}

The use of curly brackets to eliminate the possibility of the combinations being typed because the user wants that combo, rather than an arrow.

(There's a space in the last one because it was treating it as some kind of html tag. That wouldn't be in the feature!)

daverowland's picture

On the off chance anyone likes this idea, here's the code so you don't have to type it out yourself:
feature dlig {
sub braceleft less hyphen braceright by arrowleft;
sub braceleft asciicircum bar braceright by arrowup;
sub braceleft hyphen greater braceright by arrowright;
sub braceleft bar v braceright by arrowdown;
sub braceleft less hyphen greater braceright by arrowboth;
sub braceleft asciicircum bar v braceright by arrowupdn;
sub braceleft less asciicircum braceright by uni2196;
sub braceleft asciicircum greater braceright by uni2197;
sub braceleft v greater braceright by uni2198;
sub braceleft less v braceright by uni2199;
} dlig;

Bob H's picture

Or encode your arrow glyphs in the correct Unicode block and implement keyboard shortcuts -- then the keyboard shortcuts work for other fonts that have arrows.

hrant's picture

But keyboard shortcuts are not "transferable".

hhp

daverowland's picture

I did consider using {arrowleft}, {arrowupdown}, {arrowNE} etc. but thought that might be too anglocentric, although easier for the user to remember.

Nick Shinn's picture

Why?
There are better things to waste your time with than embellishing WGL4-compliant fonts.
No point in seeking an additional standard for an encoding standard that few foundries bother with.

daverowland's picture

Aren't arrows fairly useful? I wouldn't consider including arrows that are stylistically in keeping with the font as pointless embellishment. Things like partial differential and lozenge on the other hand...

Khaled Hosny's picture

Arrows are useful, simulating an input method using glyph substitution is not.

daverowland's picture

Ok, I'll scrap the feature but keep the arrows.

Nick Shinn's picture

How useful are arrows really, as part of a typeface font?

Perhaps for maths, but then the user would be working with a specialized math font.

Do typographers actually set arrows in the same text box as running text?

Dave, what are the most common uses of typographic arrows, that you are catering to by providing them in your font?

As far as style goes, the vast majority of fonts could combine with two or three arrow styles, that are available as “sorts” in a pi-font. That font is the Symbols font, which is bundled with the Mac OS. That’s where I, as a typographer, would go to locate an arrow — it’s a small font, so the arrows are relatively easy to find in the glyph palette.

Left- and right-facing manicules are more likely to be used in text layouts.

riccard0's picture

I, as user, like being able to find arrows in the same style of the typeface I’m using, and having them in the font itself is very convenient.

ralf h.'s picture

I agree that such substitutions are really useful and I also agree it might not hurt if it wouldn't work different in every font.

Typing such symbols is much more convenient than searching each arrow in a character palette. But I am not so sure a standard text font should have this in the ligature feature. It might be better placed in a stylistic set for users who have read the instructions and know how to use it.

I wouldn't mind using English terms. If you use a Latin font in “regular” and “bold” you probably also understand “left” or “west”. Things like {^|v} are a bit cryptic.

I am currently working on a wayfinding symbols font with lots of arrows and I use codes like:
#left
#right
#up
#down
#leftup
#leftdown
#rightup
#rightdown

The reason for not using cardinal directions like east and west is that there are much more arrows such as “upwithhookleft” and “upwithtipright”, loosely based on the naming conventions in Unicode.

daverowland's picture

Nick, I only worked briefly as an actual user of fonts, and never in any situations where I needed arrows. I imagine they would be useful in certain kinds of tables (share index 'TYPE ↑1.7%' - that kind of thing) and in these situations the arrows having the same width as tabular figures would be useful. Getting arrows from a different font seems to me like it would be more hassle than finding the arrows in the glyph palette for the same font. Arrows do seem to me to be far more useful than a lot of the other glyphs we have to make. Has anyone here even seen a perthousand used anywhere? Nick, If people use a specialised maths font for maths (which I expect they do) it doesn't follow that you include things like partial differential in your fonts, but you do. I think it's interesting that you would consider arrows an embellishment but not these other things, or are you just working to an encoding standard (Adobe?) that forces you to include them?

Ralf, I have been convinced not to use any kind of substitutions for arrows, mainly because changing the font to a different one doesn't keep the arrow, but reverts to #left for example. I have decided the best way to deal with them is to put them in an ornaments feature, so they can be found easily in the glyph palette.

Nick Shinn's picture

I only worked briefly as an actual user of fonts, and never in any situations where I needed arrows.

I worked for 25 years as a print designer, in advertising, marketing and editorial, and IIRC never once set an arrow, outside of a diagram. Manicules (Printer’s Fists), very occasionally.

Riccardo, what uses of arrows have you come across?

Has anyone here even seen a perthousand used anywhere?

Matthew Carter used it in a conference talk on the relative statistical frequency of letters in newspaper text.

(He reasoned that by narrowing the most frequent letters, one could create a more space-efficient font, without having it look condensed.)

Nick, If people use a specialised maths font for maths (which I expect they do) it doesn't follow that you include things like partial differential in your fonts, but you do.

I do, because they are in the standard encoding.
(However, I omitted them in earlier “Mac only” PostScript-encoded fonts, which was standard practice.)
Arrows are only in WGL4, which is not an encoding generally supported by foundries.

It amazes me that calculus symbols are in a basic encoding, but not multiply and minus!

ralf h.'s picture

Do typographers actually set arrows in the same text box as running text?

Sure they do. I do that all the time.
And if its not in the text box, I might use it in accompanying info graphics in magazines, text books, annual reports or whatever. Using arrows that match the typeface will usually be a better choice than just throwing system font symbols in the mix.
But maybe that's also a chicken or the egg dilemma. If more regular text fonts had such arrows, people would expect these symbols more often and look for it. And offering easy input methods also helps. Glyph palettes are for finding special characters occasionally. If special characters are used frequently, they need to be typed.

hrant's picture

by narrowing the most frequent letters, one could create a more space-efficient font, without having it look condensed.

Which for example is why the "ա" in an Armenian font should be relative more narrower than the "ս", compared to the Latin "m" versus "n". See rightmost of: http://themicrofoundry.com/ss_rome1.html

hhp

riccard0's picture

Riccardo, what uses of arrows have you come across?

The first one that comes to my mind is to mark some linked progression between concepts, that if it’s simple and short enough would be better served in running text or parenthesis than in separate graphics (for example: letter → word → sentence).

As for input methods, I think that for symbols a visual one like a palette would be always be better than typing more or less arbitrary letter combinations, not least because of the problem with font dependance Dave mentioned.

Frode Bo Helland's picture

Has anyone here even seen a perthousand used anywhere?
It’s used for blood alcohol levels, at least in Norway.

I also use arrows from time to time for magazine work, and for websites.

Frode Bo Helland's picture

Plus: Salinity is commonly expressed as permille, and I’m sure it is also used quite a bit in various tech areas.

eliason's picture

I see arrows occasionally used to indicate which caption goes with which image on a page (though admittedly that's a use where matching the font wouldn't necessarily be necessary, or even preferable).

Nick Shinn's picture

for example: letter → word → sentence

Yes, I’ve included left and right pointing arrows in some fonts, for this purpose, as it was the kind of usage that I thought might occur. But I didn’t bother with any other angles, as I assumed that for such requirements the basic arrow could be put in its own text box, and that rotated, such usages being graphic, not typographic.

***

Ralf, could you post some examples of your typography with arrows?

I’m open to the suggestion that it might be worthwhile to include a range of arrows in certain kinds of typeface.

dezcom's picture

Wayfinding type has a good use for it. I use the standard encodings, though.

daverowland's picture

I’m open to the suggestion that it might be worthwhile to include a range of arrows in certain kinds of typeface.

If you can see the benefit of left and right arrows, it is all of a few minutes work to fill out the other directions. I understand you being skeptical about pointlessly embellishing fonts, but for the sake of a few minutes work, and while there are people who say they do use arrows, why not?

riccard0's picture

such usages being graphic, not typographic

I find really difficult to draw a line between the two.

Té Rowan's picture

Good Lord! *chokes* Nick Shinn is an all-the-world's-a-Mac guy!

ralf h.'s picture

By the way: OpenType replacements and official unicode values don't rule each other out. If you set the correct Unicode values people can use glyph palettes and copy and paste. But it doesn't hurt to offer additional replacement codes via OpenType. If the user actively turns on a stylistic set and uses such codes, he won't be confused, when he switches the font and something like {west} appears.

Some example of symbol fonts with this technique:
https://www.typotheque.com/blog/icon_font_in_10_weights
http://opentype.info/blog/2011/04/13/wayfinding-symbols-with-opentype-ma...
http://symbolset.com

Nick Shinn's picture

Good Lord! *chokes* Nick Shinn is an all-the-world's-a-Mac guy!

Not really.

Sure, WGL4 is a “PC” standard, and I’m a Mac guy from way back, when retail fonts were just for the graphics trade, as was Apple.

If WGL4 was supported by the majority of foundries, I’d feel obliged to do likewise, but as they don’t, I’m relieved to omit unnecessary characters.

Perhaps I’m restricting my potential market, but I have yet to receive a customer complaint “I licensed your font, now where are the arrows?”

ralf h.'s picture


for example: letter → word → sentence
Yes, I’ve included left and right pointing arrows in some fonts, for this purpose, as it was the kind of usage that I thought might occur. But I didn’t bother with any other angles, as I assumed that for such requirements the basic arrow could be put in its own text box, and that rotated, such usages being graphic, not typographic.

Such an example as “a → b → c” can also easily appear in a table, where you want to set it as:
a

b

c

That’s a typical use of a real Unicode character. I wouldn’t want to set this as rotated vector image. That would be a rather cumbersome work-around.

John Hudson's picture

Bob H has it right: arrows should be encoded using the Unicode arrow character codepoints, and should not be treated as ligatures of other characters that happen to bear some resemblance to bits of arrows e.g. ^|. If you want to be able to enter such characters using mnemonic keyboard sequences, that's a keyboard issue, not a font issue.

Hrant: But keyboard shortcuts are not "transferable".

And they don't need to be. What needs to be transferable is the encoded text. If you encode something as ^| then that is what it is encoded as: not an arrow, but an ascii circumflex and a bar sign. If you have a particular font that displays this sequence as an arrow, that isn't a transferable solution, because as soon as you display the text in a different font you will see ^| and not ↑. The arrow character ↑ is the only reliable interchange encoding for an upwards pointing arrow, which is why there is a standard.

A general rule: do not using glyph display technologies to misrepresent underlying character encodings.

ralf h.'s picture

That’s all right and good, but I don't think every font use is meant to be »transferable«.

daverowland's picture

I can see both sides of this argument. I've decided not to use any glyph replacement features for the arrows, partly for the transferability problems mentioned above, but mostly because I think it would actually be quicker for the user to go into the glyph palette and select the arrow (in ornaments feature probably) than remember the correct keystrokes, type them in, and select dlig (or ss05 or whatever).

filip blazek's picture

As a designer, I need arrows very often, especially working on books. Not only the authors use arrows in their diagrams, charts or formulas, from time to time, I use them in captions to point to particular image etc. The presence of arrows is an important factor for me when selecting a font family for a new project.

I prefer arrows to have proper Unicode indices to allow me to switch between fonts without losing them. I usually don't use OT features to enable the arrows, I prefer Glyph panel.

John Hudson's picture

Ralf: ... I don't think every font use is meant to be »transferable«.

Nor do I. Design-specific features are obviously suitable matter for discretionary glyph processing. But arrows are not design-specific features, they are standard characters and should be handled as such. If a font contained multiple styles of arrows, then there would be a glyph processing issue and the need for a decision about how best to access the variants, but the underlying encoding should still be the standard arrow characters.

Syndicate content Syndicate content