Skip to content

Commit

Permalink
Update gettingstarted.md
Browse files Browse the repository at this point in the history
Change "TryFind" to "TryGet". TryFind is no longer available.
  • Loading branch information
digitaldirk authored Jan 16, 2024
1 parent c84baa2 commit 1069317
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 1069317

Please sign in to comment.