Skip to content

Handle the exception when system has no fonts#1019

Merged
tonyqus merged 2 commits into
nissl-lab:masterfrom
jake-codes-at-5-am:handle-the-exception-when-system-has-no-fonts-on-linux
Feb 24, 2023
Merged

Handle the exception when system has no fonts#1019
tonyqus merged 2 commits into
nissl-lab:masterfrom
jake-codes-at-5-am:handle-the-exception-when-system-has-no-fonts-on-linux

Conversation

@artemkoloskov-admin
Copy link
Copy Markdown
Contributor

On linux (specifically in latest docker ubuntu images) if there are no font's installed in the operating system the method SheetUtil.IFont2Font will throw an unifotmative exception stating that "Sequence contains no elements" Now it will throw an exception that will be more informative.

Artem Koloskov and others added 2 commits February 21, 2023 15:12
On linux (specifically in latest docker ubuntu images) if there are no font's installed in the operating system the method SheetUtil.IFont2Font will throw an unifotmative exception stating that "Sequence contains no elements" Now it will throw an exception that will be more informative.
@tonyqus
Copy link
Copy Markdown
Member

tonyqus commented Feb 24, 2023

LGTM

@tonyqus tonyqus added this to the NPOI 2.6.1 milestone Feb 24, 2023
@tonyqus tonyqus merged commit 919d455 into nissl-lab:master Feb 24, 2023
@artemkoloskov-admin artemkoloskov-admin deleted the handle-the-exception-when-system-has-no-fonts-on-linux branch February 27, 2023 07:19
@superrnovae
Copy link
Copy Markdown
Contributor

Please use !SystemFonts.Families.Any() method instead of itterating the whole collection with Count().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants