Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle the exception when system has no fonts #1019

Conversation

artem-iron
Copy link
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
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
@artem-iron artem-iron deleted the handle-the-exception-when-system-has-no-fonts-on-linux branch February 27, 2023 07:19
@superrnovae
Copy link
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.

None yet

3 participants