1

When I open the following little html document in Firefox (Arch Linux) it is rendered like so:

enter image description here

<!DOCTYPE html>
<html>
<head>
  <title>Title</title>
  <meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
<style>
/* * { font-family: Noto Sans UI          } */
/* * { font-family: DejaVu Serif          } */
/* * { font-family: Bitstream Vera Sans   } */
   * { font-family: Bitstream Vera Serif  }
</style>
</head>
<body>

   Foo&nbsp;Bar<br>
   Foo Bar

</body>
</html>

I believe this had not always been the case and I thought that &nbsp; should be rendered with the same with as an "ordinary" space. Apparently, this is not the case. So, how can I create a non breaking space with the same width as a space?

Edit Apparently, this is the case when I use Bitstream Vera Sans or Serif. When I use Noto Sans UI or DejaVu Serif both spaces are rendered with the same with.

René Nyffenegger
  • 39,402
  • 33
  • 158
  • 293

0 Answers0