Forum Bugs

profoundly weird bug where invalid unicode character is added to text

dauwhe
I hardly know how to describe this. Consider the following reduced case:

<html xml:lang="en" lang="en">
<head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
    <title>Kipper's Game</title>
   <style type="text/css">
@font-face {
    font-family: "Fairfield LT Std"; 
    src: url('fonts/FairfieldLTStd-Light.otf');
}

h1 {
  font-family: 'Fairfield LT Std';
  font-variant: small-caps;
  text-transform: lowercase;
  word-spacing: 0pt;
  }
  
   </style>              
</head>

<body>
<h1>BARBARA EHRENREICH</h1>
<h1>BARBAR EHRENREICH</h1>
<h1>BARBA EHRENREICH</h1>
<h1>BARB EHRENREICH</h1>
<h1>BAR EHRENREICH</h1>
<h1>BA EHRENREICH</h1>
<h1>B EHRENREICH</h1>
<h1>EHRENREICH</h1>
<h1>barbarar</h1>
<h1>barbara</h1>
</body>
</html>


In the first, third, and fifth lines, a strange character (looking like a box with an X) is inserted between the words. In the last case, it's inserted after the word. If you remove the letter-spacing of zero, the weird character appears in a different place on those same lines.

The character, as best as I can tell, is U+DBC0 followed by U+DC00.

PDF rendering attached. You can ask me for the font if you don't have it :)

So, so weird...

This does seem specific to the combination of font, text-transform, and font-variant. But so very strange that it depends on literal content!
  1. weird.pdf32.4 kB
mikeday
That is weird, would you be able to email me the font in question? Perhaps there is something funny going on with the small-caps substitution.
mn4367
There is more weirdness. All characters are displayed twice and the preview app on the Mac doesn't show the X-like character.
  1. weird.png19.9 kB
mikeday
The characters getting displayed twice is presumably unnecessary fake bold, which can be fixed by specifying font-weight: normal for the h1 elements or using the latest build of Prince and specifying font-weight: bold for the @font-face rule or just disabling fake bold with --no-artificial-fonts.

The X character only seems to show up in Acrobat, no other PDF viewer shows it.
mikeday
We have a fix for this issue in the latest build! Thanks for letting us know about it, definitely a fun one to track down. :D