Skip to content

Custom font documentation is apparently wrong #685

@djeikyb

Description

@djeikyb

According to this issue: AvaloniaUI/Avalonia#18887

@Gillibald has said that the guide to using (a) the inter font (b) any embedded font collection is wrong.

https://github.com/AvaloniaUI/avalonia-docs/blob/2826d243c4ac714024a4c6d9226ae4761589b167/docs/guides/styles-and-resources/how-to-use-fonts.md#adding-a-font-to-the-font-collection

I think the entire section "Adding a Font to the Font Collection" needs to be revised, possibly rewritten.

This sentence and example in particular have been called out by Gillibald as wrong:

For example, instead of setting the FontFamily to {StaticResource NunitoFont}, you can simply reference the name of the font family directly.

<TextBlock
    Text="{Binding Greeting}"
    FontSize="70"
    FontFamily="Nunito"
    HorizontalAlignment="Center" VerticalAlignment="Center" />

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions