Browse Source
Merge pull request #5017 from MarchingCube/fix-font-family-parse
Add a single argument Parse function for FontFamily.
pull/5026/head
Max Katz
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
11 additions and
1 deletions
-
src/Avalonia.Visuals/Media/FontFamily.cs
|
|
|
@ -133,6 +133,16 @@ namespace Avalonia.Media |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Parses a <see cref="T:Avalonia.Media.FontFamily"/> string.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="s">The <see cref="T:Avalonia.Media.FontFamily"/> string.</param>
|
|
|
|
/// <returns></returns>
|
|
|
|
/// <exception cref="ArgumentException">
|
|
|
|
/// Specified family is not supported.
|
|
|
|
/// </exception>
|
|
|
|
public static FontFamily Parse(string s) => Parse(s, null); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Parses a <see cref="T:Avalonia.Media.FontFamily"/> string.
|
|
|
|
/// </summary>
|
|
|
|
@ -142,7 +152,7 @@ namespace Avalonia.Media |
|
|
|
/// <exception cref="ArgumentException">
|
|
|
|
/// Specified family is not supported.
|
|
|
|
/// </exception>
|
|
|
|
public static FontFamily Parse(string s, Uri baseUri = null) |
|
|
|
public static FontFamily Parse(string s, Uri baseUri) |
|
|
|
{ |
|
|
|
if (string.IsNullOrEmpty(s)) |
|
|
|
{ |
|
|
|
|