/// <summary> /// Try-pattern version of <see cref="GetCharMetrics"/>. /// </summary> public bool TryGetCharMetrics(Rune rune, float scale, out CharMetrics metrics, bool fallback = true) { var maybe = GetCharMetrics(rune, scale); if (maybe.HasValue) { metrics = maybe.Value; return(true); } metrics = default; return(false); }
/// <summary> /// Try-pattern version of <see cref="GetCharMetrics"/>. /// </summary> public bool TryGetCharMetrics(char chr, out CharMetrics metrics) { var maybe = GetCharMetrics(chr); if (maybe.HasValue) { metrics = maybe.Value; return(true); } metrics = default; return(false); }
public bool TryGetCharMetrics(char chr, out CharMetrics metrics) { return(TryGetCharMetrics(chr, 1, out metrics)); }