move classes to new projects

to make the project more useful and expose more usable classes we're rearchitecting in the following way. code used to read fonts from external file formats like truetype, adobe font metrics (afm) and adobe type 1 fonts are moving to a new project which doesn't reference most of the pdf logic. the shared logic is moving to a new flat-structured project called core. this is a sort-of onion type architecture, with core being the... core, fonts being the next layer of the onion, pdfpig itself the next. this will then support additional libraries/projects as outer layers of the onion as well as releasing standalone version of the font library as pdfbox does with fontbox.
This commit is contained in:
Eliot Jones
2020-01-04 16:38:18 +00:00
parent cf1b8651d6
commit 7c0ef111ea
348 changed files with 2278 additions and 1335 deletions

View File

@@ -0,0 +1,53 @@
namespace UglyToad.PdfPig.PdfFonts.CidFonts
{
using Core;
using Geometry;
using Tokens;
/// <summary>
/// A CID font contains glyph descriptions accessed by
/// CID (character identifier) as character selectors.
/// </summary>
/// <remarks>
/// A CID font contains information about a CIDFont program but is
/// not itself a font. It can only be a descendant of a Type 0 font.
/// </remarks>
internal interface ICidFont
{
/// <summary>
/// <see cref="NameToken.Font"/>
/// </summary>
NameToken Type { get; }
/// <summary>
/// Either Type0 (Adobe Type 1 font) or Type2 (TrueType font).
/// </summary>
NameToken SubType { get; }
/// <summary>
/// The PostScript name of the CIDFont.
/// </summary>
NameToken BaseFont { get; }
/// <summary>
/// The definition of the character collection for the font.
/// </summary>
CharacterIdentifierSystemInfo SystemInfo { get; }
TransformationMatrix FontMatrix { get; }
CidFontType CidFontType { get; }
FontDescriptor Descriptor { get; }
double GetWidthFromDictionary(int cid);
double GetWidthFromFont(int characterIdentifier);
PdfRectangle GetBoundingBox(int characterIdentifier);
PdfVector GetPositionVector(int characterIdentifier);
PdfVector GetDisplacementVector(int characterIdentifier);
}
}