mirror of
https://github.com/jmcnamara/libxlsxwriter.git
synced 2026-05-15 14:15:54 -06:00
[GH-ISSUE #96] How to keep default font size? #79
Labels
No labels
awaiting user feedback
bug
cmake
cmake
docs
feature request
in progress
long term
medium term
medium term
pull-request
question
question
ready to close
short term
under investigation
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/libxlsxwriter#79
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Paxa on GitHub (Feb 27, 2017).
Original GitHub issue: https://github.com/jmcnamara/libxlsxwriter/issues/96
Originally assigned to: @jmcnamara on GitHub.
Whenever I create format it will set font size to 11
I think it should not set font size when we create format, people may change default Excel font size settings in on their computer.
And it should allow to call
format_set_font_size(format, 0)to reset to defaultWhat you think? I can create pull request
@jmcnamara commented on GitHub (Feb 27, 2017):
Same comment as #95. Changing the default font changes the row and column sizes which in turn changes object dimensions on the worksheet.
So this isn't supported.
@Paxa commented on GitHub (Feb 27, 2017):
If some dimensions are not correct we can always specify manually, right?
I try to make some examples:
All font sizes: 11 (current code)

All fonts sizes: 20

Using system settings (no font-size specified)

How can I see affected size calculations?
If we specify bigger font size for every fields in a document, will size calculations be affected?
@jmcnamara commented on GitHub (Feb 27, 2017):
Yes. If the row height or column width changes you can scale your images accordingly via the APIs.
You can see that in your screenshots the C image is different sizes. It should be the same as the first one in each of the others.
Yes. The internal calculations for object sizes and positioning is based on default, or user specified, row heights and column widths. Changing the font type or size will affect this.
@Paxa commented on GitHub (Feb 28, 2017):
Thank you for detailed explanation. I think now days displays having higher DPI, so I think many people will just set bigger font size for all fields (adding custom format), and that will affect image size calculations:

I usually generate xslx files for financial reports, so never needed to insert picture or a chart, and image size calculation will work right only if people use 11th font size, so I think it make sense to let people change default workbook's styles and be able to use users' default font size
I could not make size calculations based on font-size yet (some help would be appreciated), but I add some function to access default format