kingkont 0.7.82 → 0.7.83

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.
@@ -0,0 +1,19 @@
1
+ # Bundled fonts
2
+
3
+ All fonts in this directory are licensed under the SIL Open Font License v1.1
4
+ (<https://openfontlicense.org/>) and bundled here so KingKont can render
5
+ beautiful Cyrillic-aware label nodes without needing a network connection.
6
+
7
+ | Font | Author / Foundry | Source |
8
+ |---------------|----------------------------------------|--------------------------------------------------|
9
+ | Caveat | Pablo Impallari | <https://fonts.google.com/specimen/Caveat> |
10
+ | Bad Script | Roman Shchyukin (Gaslight) | <https://fonts.google.com/specimen/Bad+Script> |
11
+ | Pacifico | Vernon Adams | <https://fonts.google.com/specimen/Pacifico> |
12
+ | Lobster | Pablo Impallari | <https://fonts.google.com/specimen/Lobster> |
13
+ | Yeseva One | Jovanny Lemonad | <https://fonts.google.com/specimen/Yeseva+One> |
14
+ | Comfortaa | Johan Aakerlund | <https://fonts.google.com/specimen/Comfortaa> |
15
+ | PT Serif | ParaType | <https://fonts.google.com/specimen/PT+Serif> |
16
+ | PT Mono | ParaType | <https://fonts.google.com/specimen/PT+Mono> |
17
+
18
+ Files were downloaded from the @fontsource jsDelivr mirror in the
19
+ `cyrillic-400-normal` and `latin-400-normal` subsets.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kingkont",
3
- "version": "0.7.82",
3
+ "version": "0.7.83",
4
4
  "description": "KingKont · Chatium — нод-редактор сцен с AI-генерацией (картинки/видео/голос/SFX/музыка/текст)",
5
5
  "main": "main.js",
6
6
  "bin": {
@@ -61,12 +61,19 @@ $('settingsRegen').addEventListener('click', () => {
61
61
  // Шрифты — system-only, без Google Fonts CDN (приложение офлайновое).
62
62
  // На macOS все варианты выглядят естественно; на Win/Linux fallback'и
63
63
  // (cursive/fantasy/serif/monospace) сохраняют смысл.
64
+ // id хранится в node.textStyle.fontFamily, поэтому переименовывать существующие
65
+ // id (`handwritten` / `marker` / `serif` / `mono`) нельзя — это сломает
66
+ // сохранённые сцены. Новые красивые шрифты добавляем под новыми id.
64
67
  const LABEL_FONTS = [
65
68
  { id: 'default', label: 'Обычный' },
66
- { id: 'handwritten', label: 'Карандашом' },
67
- { id: 'marker', label: 'Краской' },
68
- { id: 'serif', label: 'С засечками' },
69
- { id: 'mono', label: 'Моноширинный' },
69
+ { id: 'handwritten', label: 'Карандашом' }, // Caveat
70
+ { id: 'brush', label: 'Скорописью' }, // Bad Script
71
+ { id: 'marker', label: 'Кистью' }, // Pacifico
72
+ { id: 'display', label: 'Декор' }, // Lobster
73
+ { id: 'elegant', label: 'Элегант' }, // Yeseva One
74
+ { id: 'rounded', label: 'Округлый' }, // Comfortaa
75
+ { id: 'serif', label: 'С засечками' }, // PT Serif
76
+ { id: 'mono', label: 'Моноширинный' }, // PT Mono
70
77
  ];
71
78
  const LABEL_FONT_SIZES = [12, 14, 18, 24, 32, 48, 64, 96];
72
79
  const LABEL_DEFAULT_STYLE = { fontSize: 32, italic: false, fontFamily: 'handwritten' };
@@ -1,3 +1,88 @@
1
+ /* === Bundled fonts (для label-нод, поддерживают кириллицу) ===
2
+ Все шрифты — OFL, лежат в assets/fonts/, см. NOTICE.md.
3
+ Для каждого семейства подключены два subset-файла (Latin + Cyrillic)
4
+ с unicode-range — браузер скачивает только тот блок, который нужен. */
5
+ @font-face {
6
+ font-family: 'KK Caveat'; font-style: normal; font-weight: 400; font-display: block;
7
+ src: url('../assets/fonts/caveat-cyrillic-400.woff2') format('woff2');
8
+ unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
9
+ }
10
+ @font-face {
11
+ font-family: 'KK Caveat'; font-style: normal; font-weight: 400; font-display: block;
12
+ src: url('../assets/fonts/caveat-latin-400.woff2') format('woff2');
13
+ unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
14
+ }
15
+ @font-face {
16
+ font-family: 'KK BadScript'; font-style: normal; font-weight: 400; font-display: block;
17
+ src: url('../assets/fonts/bad-script-cyrillic-400.woff2') format('woff2');
18
+ unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
19
+ }
20
+ @font-face {
21
+ font-family: 'KK BadScript'; font-style: normal; font-weight: 400; font-display: block;
22
+ src: url('../assets/fonts/bad-script-latin-400.woff2') format('woff2');
23
+ unicode-range: U+0000-00FF;
24
+ }
25
+ @font-face {
26
+ font-family: 'KK Pacifico'; font-style: normal; font-weight: 400; font-display: block;
27
+ src: url('../assets/fonts/pacifico-cyrillic-400.woff2') format('woff2');
28
+ unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
29
+ }
30
+ @font-face {
31
+ font-family: 'KK Pacifico'; font-style: normal; font-weight: 400; font-display: block;
32
+ src: url('../assets/fonts/pacifico-latin-400.woff2') format('woff2');
33
+ unicode-range: U+0000-00FF;
34
+ }
35
+ @font-face {
36
+ font-family: 'KK Lobster'; font-style: normal; font-weight: 400; font-display: block;
37
+ src: url('../assets/fonts/lobster-cyrillic-400.woff2') format('woff2');
38
+ unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
39
+ }
40
+ @font-face {
41
+ font-family: 'KK Lobster'; font-style: normal; font-weight: 400; font-display: block;
42
+ src: url('../assets/fonts/lobster-latin-400.woff2') format('woff2');
43
+ unicode-range: U+0000-00FF;
44
+ }
45
+ @font-face {
46
+ font-family: 'KK YesevaOne'; font-style: normal; font-weight: 400; font-display: block;
47
+ src: url('../assets/fonts/yeseva-one-cyrillic-400.woff2') format('woff2');
48
+ unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
49
+ }
50
+ @font-face {
51
+ font-family: 'KK YesevaOne'; font-style: normal; font-weight: 400; font-display: block;
52
+ src: url('../assets/fonts/yeseva-one-latin-400.woff2') format('woff2');
53
+ unicode-range: U+0000-00FF;
54
+ }
55
+ @font-face {
56
+ font-family: 'KK Comfortaa'; font-style: normal; font-weight: 400; font-display: block;
57
+ src: url('../assets/fonts/comfortaa-cyrillic-400.woff2') format('woff2');
58
+ unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
59
+ }
60
+ @font-face {
61
+ font-family: 'KK Comfortaa'; font-style: normal; font-weight: 400; font-display: block;
62
+ src: url('../assets/fonts/comfortaa-latin-400.woff2') format('woff2');
63
+ unicode-range: U+0000-00FF;
64
+ }
65
+ @font-face {
66
+ font-family: 'KK PTSerif'; font-style: normal; font-weight: 400; font-display: block;
67
+ src: url('../assets/fonts/pt-serif-cyrillic-400.woff2') format('woff2');
68
+ unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
69
+ }
70
+ @font-face {
71
+ font-family: 'KK PTSerif'; font-style: normal; font-weight: 400; font-display: block;
72
+ src: url('../assets/fonts/pt-serif-latin-400.woff2') format('woff2');
73
+ unicode-range: U+0000-00FF;
74
+ }
75
+ @font-face {
76
+ font-family: 'KK PTMono'; font-style: normal; font-weight: 400; font-display: block;
77
+ src: url('../assets/fonts/pt-mono-cyrillic-400.woff2') format('woff2');
78
+ unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
79
+ }
80
+ @font-face {
81
+ font-family: 'KK PTMono'; font-style: normal; font-weight: 400; font-display: block;
82
+ src: url('../assets/fonts/pt-mono-latin-400.woff2') format('woff2');
83
+ unicode-range: U+0000-00FF;
84
+ }
85
+
1
86
  * { box-sizing: border-box; margin: 0; padding: 0; }
2
87
  html, body { height: 100%; }
3
88
  body {
@@ -400,18 +485,41 @@
400
485
  content: attr(data-placeholder);
401
486
  color: rgba(200,200,200,0.35);
402
487
  }
488
+ /* === Label-шрифты ===
489
+ Все варианты — bundled woff2 (см. assets/fonts/), кириллица поддержана. */
403
490
  .node.label-node .label-text[data-font="handwritten"] {
404
- font-family: 'Caveat', 'Marker Felt', 'Bradley Hand', 'Snell Roundhand', cursive;
491
+ /* Карандашом мягкий рукописный (Caveat). */
492
+ font-family: 'KK Caveat', 'Caveat', 'Marker Felt', cursive;
493
+ line-height: 1.1;
494
+ }
495
+ .node.label-node .label-text[data-font="brush"] {
496
+ /* Скорописью — каллиграфия в русском стиле (Bad Script). */
497
+ font-family: 'KK BadScript', 'Bad Script', 'Snell Roundhand', cursive;
405
498
  }
406
499
  .node.label-node .label-text[data-font="marker"] {
407
- font-family: 'Permanent Marker', 'Chalkduster', 'Marker Felt', 'Comic Sans MS', fantasy;
408
- letter-spacing: 0.02em;
500
+ /* Кистью закруглённый плакатный шрифт (Pacifico). */
501
+ font-family: 'KK Pacifico', 'Pacifico', 'Marker Felt', cursive;
502
+ letter-spacing: 0.01em;
503
+ }
504
+ .node.label-node .label-text[data-font="display"] {
505
+ /* Декор — крупная декоративная подпись (Lobster). */
506
+ font-family: 'KK Lobster', 'Lobster', Georgia, serif;
507
+ }
508
+ .node.label-node .label-text[data-font="elegant"] {
509
+ /* Элегант — выразительный заголовочный serif (Yeseva One). */
510
+ font-family: 'KK YesevaOne', 'Yeseva One', Georgia, serif;
511
+ }
512
+ .node.label-node .label-text[data-font="rounded"] {
513
+ /* Округлый — мягкий sans (Comfortaa). */
514
+ font-family: 'KK Comfortaa', 'Comfortaa', -apple-system, sans-serif;
409
515
  }
410
516
  .node.label-node .label-text[data-font="serif"] {
411
- font-family: Georgia, 'Times New Roman', serif;
517
+ /* С засечками академический serif (PT Serif). */
518
+ font-family: 'KK PTSerif', 'PT Serif', Georgia, serif;
412
519
  }
413
520
  .node.label-node .label-text[data-font="mono"] {
414
- font-family: ui-monospace, 'SF Mono', Menlo, 'Courier New', monospace;
521
+ /* Моноширинный (PT Mono). */
522
+ font-family: 'KK PTMono', 'PT Mono', ui-monospace, Menlo, monospace;
415
523
  }
416
524
  .node.video-node .node-body { padding: 0; overflow: hidden; border-radius: 0 0 8px 8px; }
417
525
  .node.video-node .node-body video { width: 100%; height: auto; max-height: none; background: transparent; border-radius: 0; display: block; }