/
IFontCollection.cs
150 lines (133 loc) · 6.57 KB
/
IFontCollection.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
// Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0.
using System.Collections.Generic;
using System.Globalization;
using System.IO;
namespace SixLabors.Fonts
{
/// <summary>
/// A readable and writable collection of fonts.
/// </summary>
/// <seealso cref="IReadOnlyFontCollection" />
public interface IFontCollection : IReadOnlyFontCollection
{
/// <summary>
/// Adds a font to the collection.
/// </summary>
/// <param name="path">The filesystem path to the font file.</param>
/// <returns>The new <see cref="FontFamily"/>.</returns>
FontFamily Add(string path);
/// <summary>
/// Adds a font to the collection.
/// </summary>
/// <param name="path">The filesystem path to the font file.</param>
/// <param name="description">The description of the added font.</param>
/// <returns>The new <see cref="FontFamily"/>.</returns>
FontFamily Add(string path, out FontDescription description);
/// <summary>
/// Adds a font to the collection.
/// </summary>
/// <param name="stream">The font stream.</param>
/// <returns>The new <see cref="FontFamily"/>.</returns>
FontFamily Add(Stream stream);
/// <summary>
/// Adds a font to the collection.
/// </summary>
/// <param name="stream">The font stream.</param>
/// <param name="description">The description of the added font.</param>
/// <returns>The new <see cref="FontFamily"/>.</returns>
FontFamily Add(Stream stream, out FontDescription description);
/// <summary>
/// Adds a true type font collection (.ttc).
/// </summary>
/// <param name="path">The font collection path.</param>
/// <returns>The new <see cref="IEnumerable{FontFamily}"/>.</returns>
public IEnumerable<FontFamily> AddCollection(string path);
/// <summary>
/// Adds a true type font collection (.ttc).
/// </summary>
/// <param name="path">The font collection path.</param>
/// <param name="descriptions">The descriptions of the added fonts.</param>
/// <returns>The new <see cref="IEnumerable{T}"/>.</returns>
public IEnumerable<FontFamily> AddCollection(string path, out IEnumerable<FontDescription> descriptions);
/// <summary>
/// Adds a true type font collection (.ttc).
/// </summary>
/// <param name="stream">The font stream.</param>
/// <returns>The new <see cref="IEnumerable{T}"/>.</returns>
public IEnumerable<FontFamily> AddCollection(Stream stream);
/// <summary>
/// Adds a true type font collection (.ttc).
/// </summary>
/// <param name="stream">The font stream.</param>
/// <param name="descriptions">The descriptions of the added fonts.</param>
/// <returns>The new <see cref="IEnumerable{T}"/>.</returns>
public IEnumerable<FontFamily> AddCollection(Stream stream, out IEnumerable<FontDescription> descriptions);
/// <summary>
/// Adds a font to the collection.
/// </summary>
/// <param name="path">The filesystem path to the font file.</param>
/// <param name="culture">The culture of the font to add.</param>
/// <returns>The new <see cref="FontFamily"/>.</returns>
FontFamily Add(string path, CultureInfo culture);
/// <summary>
/// Adds a font to the collection.
/// </summary>
/// <param name="path">The filesystem path to the font file.</param>
/// <param name="culture">The culture of the font to add.</param>
/// <param name="description">The description of the added font.</param>
/// <returns>The new <see cref="FontFamily"/>.</returns>
FontFamily Add(string path, CultureInfo culture, out FontDescription description);
/// <summary>
/// Adds a font to the collection.
/// </summary>
/// <param name="stream">The font stream.</param>
/// <param name="culture">The culture of the font to add.</param>
/// <returns>The new <see cref="FontFamily"/>.</returns>
FontFamily Add(Stream stream, CultureInfo culture);
/// <summary>
/// Adds a font to the collection.
/// </summary>
/// <param name="stream">The font stream.</param>
/// <param name="culture">The culture of the font to add.</param>
/// <param name="description">The description of the added font.</param>
/// <returns>The new <see cref="FontFamily"/>.</returns>
FontFamily Add(Stream stream, CultureInfo culture, out FontDescription description);
/// <summary>
/// Adds a true type font collection (.ttc).
/// </summary>
/// <param name="path">The font collection path.</param>
/// <param name="culture">The culture of the fonts to add.</param>
/// <returns>The new <see cref="IEnumerable{FontFamily}"/>.</returns>
public IEnumerable<FontFamily> AddCollection(string path, CultureInfo culture);
/// <summary>
/// Adds a true type font collection (.ttc).
/// </summary>
/// <param name="path">The font collection path.</param>
/// <param name="culture">The culture of the fonts to add.</param>
/// <param name="descriptions">The descriptions of the added fonts.</param>
/// <returns>The new <see cref="IEnumerable{FontFamily}"/>.</returns>
public IEnumerable<FontFamily> AddCollection(
string path,
CultureInfo culture,
out IEnumerable<FontDescription> descriptions);
/// <summary>
/// Adds a true type font collection (.ttc).
/// </summary>
/// <param name="stream">The font stream.</param>
/// <param name="culture">The culture of the fonts to add.</param>
/// <returns>The new <see cref="IEnumerable{FontFamily}"/>.</returns>
public IEnumerable<FontFamily> AddCollection(Stream stream, CultureInfo culture);
/// <summary>
/// Adds a true type font collection (.ttc).
/// </summary>
/// <param name="stream">The font stream.</param>
/// <param name="culture">The culture of the fonts to add.</param>
/// <param name="descriptions">The descriptions of the added fonts.</param>
/// <returns>The new <see cref="IEnumerable{FontFamily}"/>.</returns>
public IEnumerable<FontFamily> AddCollection(
Stream stream,
CultureInfo culture,
out IEnumerable<FontDescription> descriptions);
}
}