Forum Bugs

spaces have font-family “Minion“

maddesigns
My client ask me why normal text have the correct font-family, but spaces have “Minion” in generated PDFs (via DocRaptor). Is this a bug or even possible? Or a “bug” in Adobe?
maddesigns
screenshots attached
  1. Font-Bsp-01.png56.2 kB
  2. Font-Bsp-02-Leerzeichen.png47.7 kB
  3. Font-Bsp-03.png52.0 kB
  4. Font-Bsp-04-Leerzeichen.png47.5 kB
mikeday
Odd, what "font-family" property applies to this paragraph and any spans within it?
pjrm
(More generally, could you attach the html ?)
pjrm
[@maddesigns: Incidentally, regarding something you wrote some years ago regarding the main difficulty of using CSS for books being avoiding widows & orphans (https://twitter.com/maddesigns/status/965902378213036032): The prince-n-lines property of Prince for Books does help a little. I use an xslt processor (or sed/perl) to add an id-like attribute to each paragraph, a css stylesheet that shows this attribute's value as an abspos box next to each paragraph (to be used while working on pagination), and then a per-edition stylesheet with rulesets like ‘[x="123"] { prince-n-lines: change }’, where I choose the paragraphs to apply it to based on length of paragraph relative to how much the paragraph would need to change in length (either length of last line, or length of remaining space plus length of the last word or hyphenated portion thereof). I am working towards doing more of this automatically, but it's a big change.]
maddesigns
mikeday wrote:
Odd, what "font-family" property applies to this paragraph and any spans within it?

Example Markup:
<p>&#xBB;Der Fusel schmeckt abscheulich!&#xAB; Mit zusammengekniffenen Augen kippte Julius Winter den selbst gebrannten Schnaps seines Freundes Johannes hinunter. Die klare Fl&#xFC;ssigkeit brannte in seiner Kehle, und f&#xFC;r einen Moment hatte Julius Angst, er k&#xF6;nnte damit seine Speiser&#xF6;hre f&#xFC;r immer ver&#xE4;tzen. Doch kaum war das Brennen weg, breitete sich ein warmes, tr&#xF6;stliches Gef&#xFC;hl in seiner Brust aus. Ein sanfter Nebel h&#xFC;llte seine Gedanken ein, und die grausamen Erinnerungen, die ihn Tag und Nacht verfolgten, verloren kurz an Bedrohlichkeit. Bilder von Leichenteilen, die quer &#xFC;ber einen Landstrich versprengt lagen, schlammige Verteidigungsgr&#xE4;ben, ein notd&#xFC;rftig eingerichtetes Feldlazarett, vor Schmerzen schreiende Kameraden, M&#xE4;nner, die f&#xFC;r den Rest ihres Lebens Kr&#xFC;ppel sein w&#xFC;rden, und ein Tierarzt, der sich heillos &#xFC;berfordert f&#xFC;hlte.</p>


and CSS:

p {
    font-family: "Quadraat", "Iowan Old Style", "Sitka Text", Palatino, "Book Antiqua", serif;

    font-feature-settings: "onum", "pnum";
    font-variant: oldstyle-nums proportional-nums;
    orphans: 1;
    widows: 2;

    font-style: normal;
    font-weight: normal;

    text-align: justify;
    hyphens: auto;
}


Quadraat is our custom font. I checked the HTML characters and there are common spaces, no spans.
pjrm
I can say that Prince is expressing the spaces in the justified text of this paragraph using negative kerns (with the TJ operator in PDF) rather than, say, space glyphs and the word-spacing operator.

The pdf that I get has no mention of Minion (and you can try running pdffonts on your pdf, or posting the pdf here, if you want to check), but Minion is a default font for some Adobe products, and it's possible that the software is saying "there is no font here" and so showing Minion as an arbitrary placeholder font name.
  1. minion.html1.6 kB
  2. minion.pdf18.2 kB
maddesigns
That’s what I think too.
(but Print-PDFs generated with Adobe-Tools, don’t have the “problem”)
pjrm
The InDesign pdf that I looked at just now is using space glyphs and a word-spacing operator in its justified text.

There's a reason that we aren't doing so, related to a design flaw in the PDF language where character widths are stored in two different places but in a way that requires the widths to be slightly different, and some printers use one source and others the other. The sum of the errors between the two sources across a line add up to less than 1pt other than in pathalogical cases, and InDesign chooses to ignore the problem (in effect putting all the error at the end of the line), while Prince is trying to address the problem by making tiny adjustments at each space, so that there is no uniform word spacing. It's not clear that Prince's current output is the right approach, but there is no perfect solution to the problem, short of getting all future printers to agree on which width information to use.
maddesigns
Thanks for the explanation!