fika-editor 3.4.3 → 3.4.6
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/embed/agentic-manifest.json +2 -2
- package/dist/embed/chunks/9541.js +1 -1
- package/dist/embed/fika-embed.css +2 -2
- package/dist/embed/fika-embed.js +3 -3
- package/dist/embed/fonts/Carlito-Bold.woff2 +0 -0
- package/dist/embed/fonts/Carlito-BoldItalic.woff2 +0 -0
- package/dist/embed/fonts/Carlito-Italic.woff2 +0 -0
- package/dist/embed/fonts/Carlito-OFL.txt +94 -0
- package/dist/embed/fonts/Carlito-Regular.woff2 +0 -0
- package/dist/types/configs/font.d.ts +1 -1
- package/dist/types/embed/export.d.ts +4 -0
- package/dist/types/utils/textFit.d.ts +2 -2
- package/docs/EMBED.md +15 -3
- package/package.json +1 -1
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
Copyright 2013 The Carlito Project Authors (https://github.com/googlefonts/carlito), with Reserved Font Name "Carlito"
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
5
|
+
This license is copied below, and is also available with a FAQ at:
|
|
6
|
+
https://scripts.sil.org/OFL
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
-----------------------------------------------------------
|
|
10
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
11
|
+
-----------------------------------------------------------
|
|
12
|
+
|
|
13
|
+
PREAMBLE
|
|
14
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
15
|
+
development of collaborative font projects, to support the font creation
|
|
16
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
17
|
+
open framework in which fonts may be shared and improved in partnership
|
|
18
|
+
with others.
|
|
19
|
+
|
|
20
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
21
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
22
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
23
|
+
redistributed and/or sold with any software provided that any reserved
|
|
24
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
25
|
+
however, cannot be released under any other type of license. The
|
|
26
|
+
requirement for fonts to remain under this license does not apply
|
|
27
|
+
to any document created using the fonts or their derivatives.
|
|
28
|
+
|
|
29
|
+
DEFINITIONS
|
|
30
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
31
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
32
|
+
include source files, build scripts and documentation.
|
|
33
|
+
|
|
34
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
35
|
+
copyright statement(s).
|
|
36
|
+
|
|
37
|
+
"Original Version" refers to the collection of Font Software components as
|
|
38
|
+
distributed by the Copyright Holder(s).
|
|
39
|
+
|
|
40
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
41
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
42
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
43
|
+
new environment.
|
|
44
|
+
|
|
45
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
46
|
+
writer or other person who contributed to the Font Software.
|
|
47
|
+
|
|
48
|
+
PERMISSION & CONDITIONS
|
|
49
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
50
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
51
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
52
|
+
Software, subject to the following conditions:
|
|
53
|
+
|
|
54
|
+
1) Neither the Font Software nor any of its individual components,
|
|
55
|
+
in Original or Modified Versions, may be sold by itself.
|
|
56
|
+
|
|
57
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
58
|
+
redistributed and/or sold with any software, provided that each copy
|
|
59
|
+
contains the above copyright notice and this license. These can be
|
|
60
|
+
included either as stand-alone text files, human-readable headers or
|
|
61
|
+
in the appropriate machine-readable metadata fields within text or
|
|
62
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
63
|
+
|
|
64
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
65
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
66
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
67
|
+
presented to the users.
|
|
68
|
+
|
|
69
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
70
|
+
Software shall not be used to promote, endorse or advertise any
|
|
71
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
72
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
73
|
+
permission.
|
|
74
|
+
|
|
75
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
76
|
+
must be distributed entirely under this license, and must not be
|
|
77
|
+
distributed under any other license. The requirement for fonts to
|
|
78
|
+
remain under this license does not apply to any document created
|
|
79
|
+
using the Font Software.
|
|
80
|
+
|
|
81
|
+
TERMINATION
|
|
82
|
+
This license becomes null and void if any of the above conditions are
|
|
83
|
+
not met.
|
|
84
|
+
|
|
85
|
+
DISCLAIMER
|
|
86
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
87
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
88
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
89
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
90
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
91
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
92
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
93
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
94
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
Binary file
|
|
@@ -14,7 +14,7 @@ export declare function parseFontSize(value: string | number | undefined, fallba
|
|
|
14
14
|
export declare function clampFontSize(size: number, min?: number, max?: number): number;
|
|
15
15
|
export declare function stepFontSize(size: number, direction: 1 | -1, min?: number, max?: number): number;
|
|
16
16
|
export declare function fontSizeToPx(size: number): string;
|
|
17
|
-
export declare const FONT_VALUES: readonly ['', 'SourceSerif4', 'JetBrainsMono', 'Literata', 'Inter', 'Roboto', 'OpenSans', 'Montserrat', 'SourceSansPro', 'Merriweather', 'Lato'];
|
|
17
|
+
export declare const FONT_VALUES: readonly ['', 'Calibri', 'SourceSerif4', 'JetBrainsMono', 'Literata', 'Inter', 'Roboto', 'OpenSans', 'Montserrat', 'SourceSansPro', 'Merriweather', 'Lato'];
|
|
18
18
|
export interface FontOption {
|
|
19
19
|
label: string;
|
|
20
20
|
value: string;
|
|
@@ -12,6 +12,10 @@ export interface FikaExportOptions extends Pick<PresentationExportOptions, 'medi
|
|
|
12
12
|
assetBaseUrl?: string;
|
|
13
13
|
/** PDF raster width in pixels. Default 2560, maximum 8192. */
|
|
14
14
|
width?: number;
|
|
15
|
+
/** JPEG avoids PNG decode/recompression in the PDF writer. Default image/jpeg. */
|
|
16
|
+
imageFormat?: 'image/jpeg' | 'image/png';
|
|
17
|
+
/** JPEG quality, 0–1. Default 0.95. PNG remains available for lossless output. */
|
|
18
|
+
quality?: number;
|
|
15
19
|
/** Resource timeout per slide in milliseconds. Default 30000. */
|
|
16
20
|
timeoutMs?: number;
|
|
17
21
|
onProgress?: (completed: number, total: number, detail?: FikaExportProgress) => void;
|
|
@@ -18,9 +18,9 @@ export declare const DEFAULT_TEXT_FONT_SIZE = 16;
|
|
|
18
18
|
* empty. Canvas wrap must use the same stack — generic `sans-serif` is a
|
|
19
19
|
* different face and packs a different number of words per line.
|
|
20
20
|
*/
|
|
21
|
-
export declare const DEFAULT_TEXT_FONT_FAMILY = "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"";
|
|
21
|
+
export declare const DEFAULT_TEXT_FONT_FAMILY = "Calibri, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"";
|
|
22
22
|
/** @deprecated Use DEFAULT_TEXT_FONT_FAMILY */
|
|
23
|
-
export declare const DEFAULT_FIT_FONT_FAMILY = "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"";
|
|
23
|
+
export declare const DEFAULT_FIT_FONT_FAMILY = "Calibri, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"";
|
|
24
24
|
export declare function resolvePaintFontFamily(family?: string | null): string;
|
|
25
25
|
/** Matches `ul, ol { padding-inline-start: 1em }` when the list has no inline pad. */
|
|
26
26
|
export declare const DEFAULT_LIST_PADDING_EM = 1;
|
package/docs/EMBED.md
CHANGED
|
@@ -570,7 +570,7 @@ const pdf = await exportPresentationPdf(document, options)
|
|
|
570
570
|
```
|
|
571
571
|
|
|
572
572
|
PPTX retains editable elements. PDF uses the existing slide painter with one
|
|
573
|
-
high-resolution
|
|
573
|
+
high-resolution JPEG per page (2560 pixels wide by default), preserving slide
|
|
574
574
|
order and aspect ratio. PDF text is rasterized. No additional document IR is
|
|
575
575
|
required. Load `fika-embed.css` before PDF export so bundled fonts are available.
|
|
576
576
|
|
|
@@ -580,13 +580,18 @@ The optional `detail` (`FikaExportProgress`) includes `phase` (`preparing`, `ren
|
|
|
580
580
|
completed slides; packaging continues after all slides render, and `progress: 1`
|
|
581
581
|
is emitted only when the returned Blob is ready. Errors reject without a completion event.
|
|
582
582
|
|
|
583
|
-
PPTX generation, PDF
|
|
583
|
+
PPTX generation, PDF packaging, and font decoding run in module
|
|
584
584
|
workers. Serve the complete `dist/embed` directory, including worker and chunk
|
|
585
585
|
files, under `assetBaseUrl`; the host's CSP must permit same-origin workers.
|
|
586
586
|
DOM-dependent preparation still runs on the main thread with cooperative yields.
|
|
587
587
|
Omitted resolvers use the current embed configuration. Pass `null` explicitly
|
|
588
588
|
to disable a resolver. PDF also accepts `width` (64 to 8192 pixels) and
|
|
589
|
-
`timeoutMs` (default 30000 per slide).
|
|
589
|
+
`timeoutMs` (default 30000 per slide). `imageFormat` defaults to `image/jpeg` with
|
|
590
|
+
`quality: 0.95`; use `imageFormat: 'image/png'` for lossless output. JPEG bytes are
|
|
591
|
+
embedded directly without decoding and recompressing each page. Rendering uses
|
|
592
|
+
bounded concurrency and skips idle waits when all resources are ready. Export
|
|
593
|
+
time still depends on slide count, image downloads, raster size, and hardware.
|
|
594
|
+
Required watermark and PDF image failures
|
|
590
595
|
reject the promise. PPTX retains its existing partial-media warning behavior.
|
|
591
596
|
|
|
592
597
|
The native export dialog now offers `pptx`, `pdf`, and `json`; control their
|
|
@@ -615,3 +620,10 @@ bundled font cannot be fetched or decoded, export rejects instead of silently
|
|
|
615
620
|
omitting it. Fonts outside the bundled catalog still depend on the receiving
|
|
616
621
|
application's font availability. Embedded fonts improve portability in viewers
|
|
617
622
|
that support them; PDF is available for a fixed visual result.
|
|
623
|
+
|
|
624
|
+
New presentations and theme presets default to Calibri for text. Browsers use
|
|
625
|
+
installed Calibri where available, otherwise bundled Carlito (OFL, metrically
|
|
626
|
+
compatible) in regular, bold, italic, and bold italic. This fallback needs no
|
|
627
|
+
Google Fonts request. PPTX retains the Calibri family name for native Office
|
|
628
|
+
rendering; it does not embed Carlito under the Calibri name. Explicit document
|
|
629
|
+
font choices are preserved.
|