8

A question was asked recently on another forum that made me rethink my understanding of vector formats. TrueType fonts are in a vector format and - I had previously thought - that if a vector editor was to present them for editing, it would present only the points described in the original font shape and, if there are curves, present appropriate handles at only those points.

I don't see how one software package (Glyphs) can interpret a in Arial as 20 points and another (Illustrator) interpret it as 37 points when converted to outlines or expanded. I don't have Glyphs to hand but can confirm that Illustrator did present 37 points when trying myself. The original poster provided illustrations of both outcomes as follows:

The a from Arial in Glyphs:

The word arial in the same font in Illustrator (focus on the points in the letter a vs the same in Glyphs):

I understand the basic concept of vector image files; that the data is a series of coordinates for points and other information mathematically detailing the amount of curve (or lack of) between points. What I don't understand is two things:

  1. Is the data in a TrueType font not described in such a way that it can be very literally translated into an editable shape in Illustrator when outlined? Why has Illustrator added additional points? Or is the TrueType format not described using points at all (I don't see how)?

  2. Glyphs appears to demonstrate that it's possible to describe certain curves in a limited amount of points. Why would a highly reputed piece of software like Illustrator need more points to describe the same curve? I would see this as a poor translation and I imagine most users would expect this too. This overlaps with question one a little so perhaps a single answer covers both.

  • Can you please include a link to the previous discussion (and source of the images, IIUC)? – Wrzlprmft Nov 22 '17 at 11:01
  • I'm afraid the original post was an unholy mess and was phrased around the question of malware/virus causing this point issue (and was not a graphic design forum, so people were entertaining this idea without much merit in the discussion). I didn't venture into it but it led me to ponder the question I've asked here. – biscuitstack Nov 22 '17 at 12:48
  • One note: your image of arial in Illustrator shows 37 anchor points for the letter a, not 36. Also, I get what appear to be exactly the same (37) nodes in CorelDRAW as are shown in the Illustrator example, so whatever conversion Illustrator is doing is probably the same in Corel (and thus not entirely arbitrary). – 1006a Nov 22 '17 at 15:29
  • @1006a I'm impressed you took the time to verify! Interesting that CorelDRAW matches Illustrator. I wouldn't expect any of them to be adding points arbitrarily (and I do think that I can see a pattern where it's adding midpoint anchors if the line bends beyond a certain angle) but I'm still unsure as to why that is. – biscuitstack Nov 22 '17 at 15:54
  • 1
    Heh, well, I didn't actually count at first, just tried the conversion in CorelDraw and noticed that it said 37 nodes; then I couldn't see where it differed from the image, so of course I had to count ;-). I think this Q&A on SO "TrueType Font's glyph are made of quadratic Bezier. Why do more than one consecutive off-curve points appear in glyph outline?" look helpful for the question of where the "extra" points might be coming from (also the resources linked in the answer). – 1006a Nov 22 '17 at 16:40
4

While I cannot confirm this (I checked the Glyphs Manual and Online Help/Tutorials), it seems that the Glyphs App automatically converts the TrueType outlines to PostScript Outlines (lets remember that TT Outlines are 2nd Order, PS Outlines are 3rd order. Also, OTF can contain TT or PS Outlines, while TTF can contain TT Outlines).

If you are importing the Arial typeface (which I am almost sure is a TTF file) it means you are importing TT Outlines, then Glyphs converts to PS Outlines. Hence, less points. Here is Arial.ttf converted to PS Outlines in FontLab VI (29 nodes):

Arial PS Outline

If you open the same font preserving the TT Outlines (in this example, opened in FontLab Studio 5), you get 37 nodes (remember, there is an implied node between successive control points):

Arial TT Outline

In illustrator, type is most probably handled by a type engine that preserves the outlines format, and the quadratic points are just translated on the Create Outline command (try creating the outline of the bullet, a circle: it will create 8 nodes, coherent with the quadratic subjacent format...) Hence, more points are created. Here, in illustrator cs6:

enter image description here

Same 37 nodes.

Edit: BTW, answering the question: Glyphs "simplifies" the TT curve using Bezier Degree Elevation, i.e., converting the TT outline to PS.

  • 1
    No, in fact, it is possible to reduce quadratic outlines to cubic outlines without losing precision. It means that Glyphs preserves precision, but modifies format. Illustrator, on the other hand, is overkillling it since, for each quadratic node, is creating a cubic node (check the outline created, every node have two control points, hence, is cubic). It introduces unnecessary precision, but at least is computationally fast and exact. BTW, the other way around (converting cubics to quadratics, or PS Outlines to TT Outlines) loses precision. – Pepe Ochoa Nov 22 '17 at 18:20
  • 1
    I perhaps overvalued the statement regarding Illustrator: that preserves the outlines format as suggesting Glyphs was not preserving the outline and drew the conclusion that Glyphs conversion was slightly less faithful. I'll return to my original assumption now (which made more sense anyway). Thanks. – biscuitstack Nov 22 '17 at 18:24
  • 1
    If Illustrator is overkilling and adding unnecessary detail, and Glyphs simplifies the original curve - both would suggest that neither outcome is a faithful representation. If I was the original artist who had to purposefully place anchor points to draw each character shape and drag handles to control curves - which translation would I recognise as having the original properties of my design? I would have thought Glyphs, from our discussion above, but the term simplified has thrown me again. Or are you suggesting the bezier algorithms are simplified and not the density of anchor points? – biscuitstack Nov 22 '17 at 21:12
  • 1
    That's why I use quotes on simplify. I quote the wiki (which quotes a book in ref. 15): "A Bézier curve of degree n can be converted into a Bézier curve of degree n + 1 with the same shape." By turning TT outlines (2nd degree) to PS outlines (3rd degree), you do not lose the original design - mathematically speaking. If you try to revert from PS to TT, then you could lose some information. Now, there are also many factors that can introduce distortions: the internal representation of the shapes, rounding errors, etc. – Pepe Ochoa Nov 22 '17 at 21:29
  • 1
    Continued: some editors use decimal coordinates for the nodes/points, and then export rounded integer coordinates, which affect the exact shape of the curves. I suggest using tools to edit fonts in their original format, if you want to preserve fidelity. Otherwise, my preference is to use always PS outlines. ( Though TT outlines let you use some wicked hinting procedures! :P I guess they will be useful when working with very low resolution devices...) – Pepe Ochoa Nov 22 '17 at 21:32
11

TrueType uses quadratic Bézier curves, while most other vector programs (including Glyphs and Illustrator) use cubic Bézier curves. You can see that your Glyphs example does not use quadratic Bézier curves as the handles of adjacent anchors do not connect.

Now, quadratic Bézier curves are a special case of cubic Bézier curves¹ and thus the conversion from the former to the latter is straightforward and my educated guess from your example is that Glyphs uses such a straightforward conversion. For reasons that are beyond me, Illustrator converts quadratic Bézier curves to cubic ones in a different manner that uses more anchors².


¹ just as every square is also a rectangle, every circle is an ellipse, and so on
² here is a more detailed observation of the same phenomenon in a German forum

  • I was unaware of the distinction between various bezier curves, thanks for that. If you're suggesting that quadratic bezier curves are (more or less) a subset of cubic bezier curves, it still begs the question as to why illustrator is inserting unnecessary (in the sense that Glyphs demonstrated) points rather than providing as literal a conversion as it can. Your explanation of quadratic to cubic bezier curves would suggest that Glyphs would be very unlikely to reduce the amount of points which, in turn, would suggest illustrator is indeed adding additional ones. Not proven, of course. – biscuitstack Nov 22 '17 at 12:53
  • 3
    it still begs the question as to why illustrator is inserting unnecessary (in the sense that Glyphs demonstrated) points rather than providing as literal a conversion as it can. – as I said, the reason for this is beyond me. All I can say is that this phenomenon (Illustrator adding additional anchors) has been observed before. – Wrzlprmft Nov 22 '17 at 12:58
  • That particular follow-up question was broadly intended for anyone reading though I do understand why you interpreted it as directed to you @Wrzlprmft. Apologies for the confusion and thanks for the input thus far. – biscuitstack Nov 22 '17 at 13:18
  • 1
    @joojaa: it may be more robust to split the curve at inflection point. – Quadratic Bézier curves cannot have inflection points outside anchors. Therefore they and their cubic equivalents are automatically split at inflection points. — Also, if you expect degeneration or similar in certain cases when doing a conversion, you can usually also predict when this is going to happen, so you do not have to change this all the time. Finally, a lot of other softwares seem to do well with the straightforward conversion from quadratic to cubic. – Wrzlprmft Nov 22 '17 at 14:23
-2

Possibly changes the amount of control points to due to copyrights infringement? If it matched exactly number of points then it would be illegal?

i am 758th registered copy of illustrator in the usa v1.0, which couldn't do outline fonts then. The first day of Adobe's release it sold less than 1000 copies, the second day it sold around 16,000 copies.

Just my input, you can always simplify the path to add or remove points.

I also used fontographer back then and making a perfect typeface with all characters isn't easy. it took me over 45 days to get it close but it was never perfect.

  • Thats actually pretty reasonable reason but iif we speculate then i would guess its some kind of residue of the integer processing – joojaa Nov 22 '17 at 21:13
  • 3
    Why would it be a copyright infringement when the format is clear (quadratic Bezier curves) and should be possible to be reproduced easily? Other than that, I'm not sure the rest of the story about Illustrator's release and Fontographer is related to TrueType at all. – Andrew T. Nov 23 '17 at 4:31
  • Also, if changing the number of control points suffices to avoid copyright issues, then pixelating it would do the same. I sincerely doubt that. (CC @joojaa) – Wrzlprmft Nov 23 '17 at 9:10
  • @Wrzlprmft No copyright is not the reason, making copying the curves harder is. Adobe used to have monopoly on the font engine. So by not letting people have acces to direct underlying data makes life harder for font copyers. This point is moot today but again illustrator is INCREDIBLY old – joojaa Nov 23 '17 at 9:47
  • 1
    @AndrewT. yes maybe copyright is a misguided idea but copying is slightly hampered, doubling curves makes it harder to manipulete the font. – joojaa Nov 23 '17 at 9:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.