@embedpdf/models 2.6.1 → 2.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/pdf.d.ts +42 -6
- package/package.json +1 -1
package/dist/pdf.d.ts
CHANGED
|
@@ -2090,19 +2090,34 @@ export interface SearchAllPagesResult {
|
|
|
2090
2090
|
*/
|
|
2091
2091
|
export interface PdfGlyphObject {
|
|
2092
2092
|
/**
|
|
2093
|
-
* Origin of the glyph
|
|
2093
|
+
* Origin of the glyph (loose bounds from FPDFText_GetLooseCharBox)
|
|
2094
2094
|
*/
|
|
2095
2095
|
origin: {
|
|
2096
2096
|
x: number;
|
|
2097
2097
|
y: number;
|
|
2098
2098
|
};
|
|
2099
2099
|
/**
|
|
2100
|
-
* Size of the glyph
|
|
2100
|
+
* Size of the glyph (loose bounds from FPDFText_GetLooseCharBox)
|
|
2101
2101
|
*/
|
|
2102
2102
|
size: {
|
|
2103
2103
|
width: number;
|
|
2104
2104
|
height: number;
|
|
2105
2105
|
};
|
|
2106
|
+
/**
|
|
2107
|
+
* Tight bounds origin (from FPDFText_GetCharBox, closely surrounds the actual glyph shape).
|
|
2108
|
+
* Used for hit-testing to match Chrome's FPDFText_GetCharIndexAtPos behaviour.
|
|
2109
|
+
*/
|
|
2110
|
+
tightOrigin?: {
|
|
2111
|
+
x: number;
|
|
2112
|
+
y: number;
|
|
2113
|
+
};
|
|
2114
|
+
/**
|
|
2115
|
+
* Tight bounds size (from FPDFText_GetCharBox)
|
|
2116
|
+
*/
|
|
2117
|
+
tightSize?: {
|
|
2118
|
+
width: number;
|
|
2119
|
+
height: number;
|
|
2120
|
+
};
|
|
2106
2121
|
/**
|
|
2107
2122
|
* Whether the glyph is a space
|
|
2108
2123
|
*/
|
|
@@ -2119,25 +2134,42 @@ export interface PdfGlyphObject {
|
|
|
2119
2134
|
*/
|
|
2120
2135
|
export interface PdfGlyphSlim {
|
|
2121
2136
|
/**
|
|
2122
|
-
* X coordinate of the glyph
|
|
2137
|
+
* X coordinate of the glyph (loose bounds from FPDFText_GetLooseCharBox)
|
|
2123
2138
|
*/
|
|
2124
2139
|
x: number;
|
|
2125
2140
|
/**
|
|
2126
|
-
* Y coordinate of the glyph
|
|
2141
|
+
* Y coordinate of the glyph (loose bounds from FPDFText_GetLooseCharBox)
|
|
2127
2142
|
*/
|
|
2128
2143
|
y: number;
|
|
2129
2144
|
/**
|
|
2130
|
-
* Width of the glyph
|
|
2145
|
+
* Width of the glyph (loose bounds from FPDFText_GetLooseCharBox)
|
|
2131
2146
|
*/
|
|
2132
2147
|
width: number;
|
|
2133
2148
|
/**
|
|
2134
|
-
* Height of the glyph
|
|
2149
|
+
* Height of the glyph (loose bounds from FPDFText_GetLooseCharBox)
|
|
2135
2150
|
*/
|
|
2136
2151
|
height: number;
|
|
2137
2152
|
/**
|
|
2138
2153
|
* Flags of the glyph
|
|
2139
2154
|
*/
|
|
2140
2155
|
flags: number;
|
|
2156
|
+
/**
|
|
2157
|
+
* Tight X coordinate (from FPDFText_GetCharBox).
|
|
2158
|
+
* Used for hit-testing to match Chrome's FPDFText_GetCharIndexAtPos behaviour.
|
|
2159
|
+
*/
|
|
2160
|
+
tightX?: number;
|
|
2161
|
+
/**
|
|
2162
|
+
* Tight Y coordinate (from FPDFText_GetCharBox)
|
|
2163
|
+
*/
|
|
2164
|
+
tightY?: number;
|
|
2165
|
+
/**
|
|
2166
|
+
* Tight width (from FPDFText_GetCharBox)
|
|
2167
|
+
*/
|
|
2168
|
+
tightWidth?: number;
|
|
2169
|
+
/**
|
|
2170
|
+
* Tight height (from FPDFText_GetCharBox)
|
|
2171
|
+
*/
|
|
2172
|
+
tightHeight?: number;
|
|
2141
2173
|
}
|
|
2142
2174
|
/**
|
|
2143
2175
|
* Run object
|
|
@@ -2162,6 +2194,10 @@ export interface PdfRun {
|
|
|
2162
2194
|
* Glyphs of the run
|
|
2163
2195
|
*/
|
|
2164
2196
|
glyphs: PdfGlyphSlim[];
|
|
2197
|
+
/**
|
|
2198
|
+
* Font size of the run (all glyphs in a run share the same font size)
|
|
2199
|
+
*/
|
|
2200
|
+
fontSize?: number;
|
|
2165
2201
|
}
|
|
2166
2202
|
/**
|
|
2167
2203
|
* Page geometry
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@embedpdf/models",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Shared type definitions, data models, and utility helpers (geometry, tasks, logging, PDF primitives) that underpin every package in the EmbedPDF ecosystem.",
|
|
6
6
|
"type": "module",
|