1

I think the answer here is no (ie if the fontmetrics don't exist, then how could you). But I figure it's better to ask.

I need to figure out soft line breaks in a Java program that oftentimes is run on a Linux box. The fonts specified for the text we are breaking comes from a Word file so it uses the fonts found on a Windows system like Times New Roman.

Most Linux systems don't have Times New Roman installed. Is there any way to get accurate breaks with the specified font not installed?

And second question - we have found copying the Windows fonts to a Linux box will give us different breaks than we get on the Windows system. Do the fontmetrics have to be tuned to an O/S and/or to a Java implementation?

thanks - dave

David Thielen
  • 28,723
  • 34
  • 119
  • 193
  • "Is there any way to get accurate breaks with the specified font not installed?" Haruspication? – Andrew Thompson Jun 03 '11 at 15:54
  • I believe metrics are affected by the `Graphic`s device you're rendering to. I don't know much about this area, but I'd probably start by trying to capture the `FontRenderContext` state in Windows and try to reproduce it on Linux. No idea how you'd go about measuring without the font. – McDowell Jun 03 '11 at 18:40

0 Answers0