# OfficeFontUnicodeRangeSet

Immutable bounded set of Unicode scalar ranges used by scoped font selection.

Class 

`OfficeIMO.Drawing`

**Namespace**

`OfficeIMO.Drawing`

**Assembly**

`OfficeIMO.Core`

**Source revision**

`ba882f6b0d07` with working tree changes

**Source**

[OfficeFontUnicodeRangeSet.cs:17](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeFontUnicodeRangeSet.cs#L17)

**Implements**

`IEquatable<OfficeFontUnicodeRangeSet>`

**Modifiers**

sealed

Immutable bounded set of Unicode scalar ranges used by scoped font selection.

## Inheritance

- object
- OfficeFontUnicodeRangeSet

## Usage

Explore 6 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Returned or exposed by 2

- Property [OfficeFontFace.UnicodeRanges](/api/core/officeimo-drawing-officefontface/#property-unicoderanges)
- Property [OfficeFontUnicodeRangeSet.All](/api/core/officeimo-drawing-officefontunicoderangeset/#property-all)

### Accepted by parameters 4

- Method [OfficeFontFaceCollection.Add](/api/core/officeimo-drawing-officefontfacecollection/#method-add-string-byte-officeimo-drawing-officefontstyle-officeimo-drawing-officefontunicoderangeset) parameter `unicodeRanges`
- Method [OfficeFontFaceCollection.TryAdd](/api/core/officeimo-drawing-officefontfacecollection/#method-tryadd-string-byte-officeimo-drawing-officefontstyle-officeimo-drawing-officefontunicoderangeset) parameter `unicodeRanges`
- Method [OfficeFontUnicodeRangeSet.Equals](/api/core/officeimo-drawing-officefontunicoderangeset/#method-equals-officeimo-drawing-officefontunicoderangeset) parameter `other`
- Method [OfficeFontUnicodeRangeSet.TryParseCss](/api/core/officeimo-drawing-officefontunicoderangeset/#method-tryparsecss-string-officeimo-drawing-officefontunicoderangeset) parameter `ranges`

Filter members 

Show inherited

## Constructors

`public OfficeFontUnicodeRangeSet(IEnumerable<OfficeFontUnicodeRange> ranges)` [#](#constructor-ctor-collections-generic-ienumerable-officeimo-drawing-officefontunicoderange)

[OfficeFontUnicodeRangeSet.cs:17](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeFontUnicodeRangeSet.cs#L17)

Creates a normalized range set.

Parameters

**ranges System.Collections.Generic.IEnumerable<OfficeIMO.Drawing.OfficeFontUnicodeRange> required**

## Methods

`public bool Contains(int scalar)` [#](#method-contains-int32)

[OfficeFontUnicodeRangeSet.cs:47](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeFontUnicodeRangeSet.cs#L47)

Returns true when the scalar is included.

Parameters

**scalar int required**

Returns

`bool`

`public bool ContainsText(string? text)` [#](#method-containstext-string)

[OfficeFontUnicodeRangeSet.cs:55](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeFontUnicodeRangeSet.cs#L55)

Returns true when every scalar in the supplied text is included.

Parameters

**text string? required**

Returns

`bool`

Equals 2 overloads

`public bool Equals(OfficeFontUnicodeRangeSet? other)` [#](#method-equals-officeimo-drawing-officefontunicoderangeset)

[OfficeFontUnicodeRangeSet.cs:122](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeFontUnicodeRangeSet.cs#L122)

Indicates whether the current object is equal to another object of the same type.

Parameters

**other OfficeIMO.Drawing.OfficeFontUnicodeRangeSet? required**

An object to compare with this object.

Returns

`bool` true if the current object is equal to the other parameter; otherwise, false.

`public override bool Equals(object? obj)` [#](#method-equals-object)

[OfficeFontUnicodeRangeSet.cs:125](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeFontUnicodeRangeSet.cs#L125)

Determines whether the specified object is equal to the current object.

Parameters

**obj object? required**

The object to compare with the current object.

Returns

`bool` true if the specified object is equal to the current object; otherwise, false.

`public override int GetHashCode()` [#](#method-gethashcode)

[OfficeFontUnicodeRangeSet.cs:130](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeFontUnicodeRangeSet.cs#L130)

Serves as the default hash function.

Returns

`int` A hash code for the current object.

`public static bool TryParseCss(string? value, out OfficeFontUnicodeRangeSet? ranges)` [#](#method-tryparsecss-string-officeimo-drawing-officefontunicoderangeset)

[OfficeFontUnicodeRangeSet.cs:77](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeFontUnicodeRangeSet.cs#L77)

Parses a CSS unicode-range descriptor such as U+0000-00FF or U+4??.

Parameters

**value string? required**

**ranges OfficeIMO.Drawing.OfficeFontUnicodeRangeSet? required**

Returns

`bool`

## Inherited Methods

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

## Properties

`public static OfficeFontUnicodeRangeSet All { get; }` [#](#property-all)

[OfficeFontUnicodeRangeSet.cs:13](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeFontUnicodeRangeSet.cs#L13)

All Unicode scalar values.

`public IReadOnlyList<OfficeFontUnicodeRange> Ranges { get; }` [#](#property-ranges)

[OfficeFontUnicodeRangeSet.cs:40](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeFontUnicodeRangeSet.cs#L40)

Normalized, ordered ranges.

`public bool IsAll { get; }` [#](#property-isall)

[OfficeFontUnicodeRangeSet.cs:43](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeFontUnicodeRangeSet.cs#L43)

True when this set covers every Unicode scalar.

<!-- PowerForge markdown artifact sha256:C512CA45432C0EAC66D2AB2F10705C2E50124BD79893BE5265EA706C5B2B3B63 -->
