question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Tutorial uses Windows specific font names

See original GitHub issue
  An unhandled exception has occurred while executing the request.
  System.ArgumentException: Unable to find font Calibri or fallback font Microsoft Sans Serif. Install missing fonts or specify a different fallback font through 'LoadOptions.DefaultGraphicEngine = new DefaultGraphicEngine("Fallback font name")'. Additional information is available at https://closedxml.readthedocs.io/en/latest/tips/missing-font.html page.
     at ClosedXML.Graphics.DefaultGraphicEngine.LoadFont(MetricId metricId)
     at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
     at ClosedXML.Graphics.DefaultGraphicEngine.GetFont(MetricId metricId)
     at ClosedXML.Graphics.DefaultGraphicEngine.GetFont(IXLFontBase fontBase)
     at ClosedXML.Graphics.DefaultGraphicEngine.GetTextWidth(String text, IXLFontBase fontBase, Double dpiX)
     at ClosedXML.Excel.XLColumn.GetWidthInCharacters(String text, IXLFontBase font)
     at ClosedXML.Excel.XLColumn.AdjustToContents(Int32 startRow, Int32 endRow, Double minWidth, Double maxWidth)
     at ClosedXML.Excel.XLColumn.AdjustToContents(Int32 startRow, Int32 endRow)
     at ClosedXML.Excel.XLColumn.AdjustToContents(Int32 startRow)
     at ClosedXML.Excel.XLColumn.AdjustToContents()
     at ClosedXML.Excel.XLColumns.<>c.<AdjustToContents>b__13_0(XLColumn c)
     at ClosedXML.Excel.EnumerableExtensions.ForEach[T](IEnumerable`1 source, Action`1 action)
     at ClosedXML.Excel.XLColumns.AdjustToContents()
     at FsExcel.Render.AsWorkBook(FSharpList`1 items)
     at FsExcel.Render.AsFile(String path, FSharpList`1 items)
     at server.Planilha.gerarPlanilha(DateTime dataInicial, DateTime dataFinal, FSharpList`1 list) in /app/lib/Planilha.fs:line 125
     at server.Rules.gerarPlanilha(DateTime dataInicial, DateTime dataFinal) in /app/lib/Rules.fs:line 229
     at server.Handlers.RelatorioHandlers.consultar(HttpContext ctx) in /app/lib/Handlers.fs:line 47
     at server.Program.main@52-5.Invoke(HttpContext ctx)
     at Microsoft.AspNetCore.Routing.EndpointMiddleware.Invoke(HttpContext httpContext)
  --- End of stack trace from previous location ---
     at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)

Issue Analytics

  • State:closed
  • Created 7 months ago
  • Reactions:2
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
misterspeedycommented, Mar 8, 2023

Closing as fixed - we have a separate issue for the default font issue with sizing.

1reaction
misterspeedycommented, Mar 6, 2023

@adelarsq Although I fixed the example where we enumerate font names, I see that autosizing also causes an exception - which I think is what you were originally getting at with this issue. I will work to fix that too.

(I’ve created an Ubuntu instance on VirtualBox so I can do some basic crossplat testing myself.)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Windows 10 font list - Typography
Family Font Name File Name Version Arial Arial Arial.ttf 7.00 Arial Italic Ariali.ttf 7.00 Arial Bold Arialbd.ttf 7.00
Read more >
Font Tutorial: Renaming Font Files (for Duplicates and ...
This tutorial is going to show you how to change the name of a font inside its code, so that it displays with...
Read more >
CSS Font Family List
Example of usage of font-family: font-family: Verdana, Arial, Tahoma, Serif; In this case, the main font is Verdana and if this is not...
Read more >
How To Change Default System Font In Windows 10 - YouTube
How To Change Default System Font In Windows 10 Paste this into Notepad: Windows Registry Editor Version 5.00 ...
Read more >
How to Change the Default Font in Microsoft Word - YouTube
Learn how to change the default font, font size, and font color in Microsoft Word. Plus, learn how to restore Word's original default...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found