Re: guessing font width



bill lam wrote:
I use gnumeric on debian and I use dejavu sans mono, but each time
gnumeric started opening excel files will give a warning

** (gnumeric:11164): WARNING **: EXCEL : unknown widths for font
'DejaVu Sans Mono', guessing

the width it guessed seemed smaller than actual and it made column
width that based on this font be narrower than it should be.  Why does
it need to guess when that dejavu  font has been installed in system?
(I can choose the font within gnumeric's font dialog box).

gnumeric version '1.9.4'

thanks in advances.


The way the Excel plugin handles font metrics can certainly be improved. We use a static table,
However, DejaVu is basically Bitstream Vera with more Unicode characters added, right? Could you
see if things look better if you add a line

                { "DejaVu Sans Mono",  9,     0x0900, 32.0 },


after the "Bitstream Vera Sans Mono" line in plugins/excel/ms-excel-util.c, l.280 or so?
If you aren't used to building from source, the easiest way on Debian is:

  apt-get source gnumeric
  apt-get build-dep gnumeric
  apt-get install fakeroot
  cd <gnumeric source directory>
  dpkg-buildpackage -rfakeroot
  cd ..
  dpkg -i gnumeric-x.y.z-blabla.deb

Regards

Jon Kåre



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]