Skip to content

Commit

Permalink
Merge pull request #64 from digitaldirk/patch-1
Browse files Browse the repository at this point in the history
Update gettingstarted.md to fix missing TryFind method
  • Loading branch information
JimBobSquarePants authored Apr 15, 2024
2 parents c84baa2 + 1069317 commit 892a8aa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions articles/fonts/gettingstarted.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ collection.Add("path/to/font2.ttf");
collection.Add("path/to/emojiFont.ttf");
collection.AddCollection("path/to/font.ttc");

if(collection.TryFind("Font Name", out FontFamily family))
if(collection.TryFind("Emoji Font Name", out FontFamily emojiFamily))
if(collection.TryGet("Font Name", out FontFamily family))
if(collection.TryGet("Emoji Font Name", out FontFamily emojiFamily))
{
// family will not be null here
Font font = family.CreateFont(12, FontStyle.Italic);
Expand All @@ -53,4 +53,4 @@ if(collection.TryFind("Emoji Font Name", out FontFamily emojiFamily))

FontRectangle rect = TextMeasurer.MeasureAdvance("Text to measure", options);
}
```
```

0 comments on commit 892a8aa

Please sign in to comment.