Skip to content

Wrong base font: hardcoded Calibri instead of font from the document #849

Closed
@victornikitin

Description

@victornikitin

There is a problem with a base font style in a lib:
/xlsx/xform/style/styles-xform.js

Currently a new base font is created for a workbook: Calibri, size 11.
But some documents have another base font style that is set in fonts collection in styles. For example: Arial, 8pt.

Problems:

  1. This font style is used to determine columns size. When a Calibri font in applyed all columns get another width.
  2. This font style can be not mentioned in any columns, rows and cell styles. So after saving the file this font is removed and everything become wrong.

Solution:
I suppose it will be right if library get the first exisiting in document font style and set it to font collection to first position instead of hardcoded Calibri, 11pt.

Is it possible to fix?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions