Buffer Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents a text buffer in memory.
public class Buffer : HarfBuzzSharp.NativeObject
- Inheritance
Constructors
| Name | Description |
|---|---|
| Buffer() |
Initializes a new instance of the Buffer class with default values. |
Fields
| Name | Description |
|---|---|
| DefaultReplacementCodepoint |
The default replacement code point (U+FFFD) used for invalid characters. |
Properties
| Name | Description |
|---|---|
| ClusterLevel |
Gets or sets the cluster level of the buffer. |
| ContentType |
Gets or sets the type of content in the buffer. |
| Direction |
Gets or sets the text flow direction of the buffer. |
| Flags |
Gets or sets the buffer flags that control shaping behavior. |
| GlyphInfos |
Gets the buffer glyph information array. |
| GlyphPositions |
Gets the buffer glyph position array. |
| Handle |
Gets or sets the handle to the underlying native object. (Inherited from NativeObject) |
| InvisibleGlyph |
Gets or sets the glyph ID used for invisible characters. |
| Language |
Gets or sets the language of the text in the buffer. |
| Length |
Gets or sets the size of the buffer. |
| ReplacementCodepoint |
Gets or sets the code point used to replace invalid characters during text processing. |
| Script |
Gets or sets the script of the text in the buffer. |
| UnicodeFunctions |
Gets or sets the Unicode functions used by the buffer. |
Methods
| Name | Description |
|---|---|
| Add(Int32, Int32) |
Appends a character with the Unicode value and gives it the initial cluster value. |
| Add(UInt32, UInt32) |
Appends a character with the Unicode value and gives it the initial cluster value. |
| AddCodepoints(IntPtr, Int32, Int32, Int32) |
Appends characters from the pointer to the buffer. |
| AddCodepoints(IntPtr, Int32) |
Appends characters from the pointer to the buffer. |
| AddCodepoints(ReadOnlySpan<Int32>, Int32, Int32) |
Appends characters from the span to the buffer. |
| AddCodepoints(ReadOnlySpan<Int32>) |
Appends characters from the span to the buffer. |
| AddCodepoints(ReadOnlySpan<UInt32>, Int32, Int32) |
Appends characters from the span to the buffer. |
| AddCodepoints(ReadOnlySpan<UInt32>) |
Appends characters from the span to the buffer. |
| AddUtf16(IntPtr, Int32, Int32, Int32) |
Appends a range of UTF-16 encoded text to the buffer. |
| AddUtf16(IntPtr, Int32) |
Appends UTF-16 encoded text to the buffer. |
| AddUtf16(ReadOnlySpan<Byte>) |
Appends UTF-16 encoded text to the buffer. |
| AddUtf16(ReadOnlySpan<Char>, Int32, Int32) |
Appends a range of UTF-16 encoded text to the buffer. |
| AddUtf16(ReadOnlySpan<Char>) |
Appends UTF-16 encoded text to the buffer. |
| AddUtf16(String, Int32, Int32) |
Appends a range of UTF-16 encoded text to the buffer. |
| AddUtf16(String) |
Appends UTF-16 encoded text to the buffer. |
| AddUtf32(IntPtr, Int32, Int32, Int32) |
Appends a range of UTF-32 encoded text to the buffer. |
| AddUtf32(IntPtr, Int32) |
Appends UTF-32 encoded text to the buffer. |
| AddUtf32(ReadOnlySpan<Byte>) |
Appends UTF-32 encoded text to the buffer. |
| AddUtf32(ReadOnlySpan<Int32>, Int32, Int32) |
Appends a range of UTF-32 encoded text to the buffer. |
| AddUtf32(ReadOnlySpan<Int32>) |
Appends UTF-32 encoded text to the buffer. |
| AddUtf32(ReadOnlySpan<UInt32>, Int32, Int32) |
Appends a range of UTF-32 encoded text to the buffer. |
| AddUtf32(ReadOnlySpan<UInt32>) |
Appends UTF-32 encoded text to the buffer. |
| AddUtf32(String) |
Appends the string as UTF-32 encoded text to the buffer. |
| AddUtf8(Byte[]) |
Appends the specified text bytes to the buffer. |
| AddUtf8(IntPtr, Int32, Int32, Int32) |
Appends a range of UTF-8 encoded text to the buffer. |
| AddUtf8(IntPtr, Int32) |
Appends UTF-8 encoded text to the buffer. |
| AddUtf8(ReadOnlySpan<Byte>, Int32, Int32) |
Appends a range of UTF-8 encoded text to the buffer. |
| AddUtf8(ReadOnlySpan<Byte>) |
Appends UTF-8 encoded text to the buffer. |
| AddUtf8(String) |
Appends the specified text to the buffer. |
| Append(Buffer, Int32, Int32) |
Appends a range from another buffer to this buffer. |
| Append(Buffer) |
Appends the contents of another buffer to this buffer. |
| ClearContents() |
Clears the buffer's contents. |
| DeserializeGlyphs(String, Font, SerializeFormat) |
Deserializes glyphs from a string and populates the buffer using the specified font and format. |
| DeserializeGlyphs(String, Font) |
Deserializes glyphs from a string and populates the buffer using the specified font. |
| DeserializeGlyphs(String) |
Deserializes glyphs from a string and populates the buffer. |
| Dispose() |
Releases all resources used by this NativeObject. (Inherited from NativeObject) |
| Dispose(Boolean) |
Releases the unmanaged resources used by the Buffer and optionally releases the managed resources. |
| DisposeHandler() |
Releases the unmanaged resources used. |
| GetGlyphInfoSpan() |
Gets a span over the glyph information array. |
| GetGlyphPositionSpan() |
Gets a span over the glyph position array. |
| GuessSegmentProperties() |
Sets the unset buffer segment properties based on the buffer's Unicode contents. |
| NormalizeGlyphs() |
Reorders glyphs so that they can be run through subsequent phases consistently. |
| Reset() |
Resets the buffer to its initial state as if it were newly created. |
| Reverse() |
Reverses the order of buffer contents. |
| ReverseClusters() |
Reverses the order of clusters in the buffer. |
| ReverseRange(Int32, Int32) |
Reverses the order of buffer contents within a specified range. |
| SerializeGlyphs() |
Serializes the buffer glyphs to a string. |
| SerializeGlyphs(Font, SerializeFormat, SerializeFlag) |
Serializes the buffer glyphs to a string using the specified font, format, and flags. |
| SerializeGlyphs(Font) |
Serializes the buffer glyphs to a string using the specified font. |
| SerializeGlyphs(Int32, Int32, Font, SerializeFormat, SerializeFlag) |
Serializes a range of buffer glyphs to a string using the specified font, format, and flags. |
| SerializeGlyphs(Int32, Int32) |
Serializes a range of buffer glyphs to a string. |