@jjlmoya/utils-tools 1.2.0 → 1.4.0

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.
Files changed (180) hide show
  1. package/package.json +2 -1
  2. package/src/category/i18n/de.ts +172 -0
  3. package/src/category/i18n/id.ts +172 -0
  4. package/src/category/i18n/it.ts +172 -0
  5. package/src/category/i18n/ja.ts +172 -0
  6. package/src/category/i18n/ko.ts +172 -0
  7. package/src/category/i18n/nl.ts +172 -0
  8. package/src/category/i18n/pl.ts +172 -0
  9. package/src/category/i18n/pt.ts +172 -0
  10. package/src/category/i18n/ru.ts +172 -0
  11. package/src/category/i18n/sv.ts +172 -0
  12. package/src/category/i18n/tr.ts +172 -0
  13. package/src/category/i18n/zh.ts +172 -0
  14. package/src/category/index.ts +13 -1
  15. package/src/tests/i18n_coverage.test.ts +36 -0
  16. package/src/tests/locale_completeness.test.ts +1 -1
  17. package/src/tests/slug_language_code_format.test.ts +23 -0
  18. package/src/tests/slug_uniqueness.test.ts +81 -0
  19. package/src/tests/title_quality.test.ts +0 -1
  20. package/src/tool/date-diff-calculator/i18n/de.ts +132 -0
  21. package/src/tool/date-diff-calculator/i18n/fr.ts +1 -1
  22. package/src/tool/date-diff-calculator/i18n/id.ts +132 -0
  23. package/src/tool/date-diff-calculator/i18n/it.ts +132 -0
  24. package/src/tool/date-diff-calculator/i18n/ja.ts +132 -0
  25. package/src/tool/date-diff-calculator/i18n/ko.ts +132 -0
  26. package/src/tool/date-diff-calculator/i18n/nl.ts +132 -0
  27. package/src/tool/date-diff-calculator/i18n/pl.ts +132 -0
  28. package/src/tool/date-diff-calculator/i18n/pt.ts +132 -0
  29. package/src/tool/date-diff-calculator/i18n/ru.ts +132 -0
  30. package/src/tool/date-diff-calculator/i18n/sv.ts +132 -0
  31. package/src/tool/date-diff-calculator/i18n/tr.ts +132 -0
  32. package/src/tool/date-diff-calculator/i18n/zh.ts +132 -0
  33. package/src/tool/date-diff-calculator/index.ts +12 -0
  34. package/src/tool/drive-direct-link/i18n/de.ts +118 -0
  35. package/src/tool/drive-direct-link/i18n/id.ts +118 -0
  36. package/src/tool/drive-direct-link/i18n/it.ts +118 -0
  37. package/src/tool/drive-direct-link/i18n/ja.ts +118 -0
  38. package/src/tool/drive-direct-link/i18n/ko.ts +118 -0
  39. package/src/tool/drive-direct-link/i18n/nl.ts +118 -0
  40. package/src/tool/drive-direct-link/i18n/pl.ts +118 -0
  41. package/src/tool/drive-direct-link/i18n/pt.ts +118 -0
  42. package/src/tool/drive-direct-link/i18n/ru.ts +118 -0
  43. package/src/tool/drive-direct-link/i18n/sv.ts +118 -0
  44. package/src/tool/drive-direct-link/i18n/tr.ts +118 -0
  45. package/src/tool/drive-direct-link/i18n/zh.ts +118 -0
  46. package/src/tool/drive-direct-link/index.ts +12 -0
  47. package/src/tool/email-list-cleaner/i18n/de.ts +140 -0
  48. package/src/tool/email-list-cleaner/i18n/fr.ts +1 -1
  49. package/src/tool/email-list-cleaner/i18n/id.ts +140 -0
  50. package/src/tool/email-list-cleaner/i18n/it.ts +140 -0
  51. package/src/tool/email-list-cleaner/i18n/ja.ts +140 -0
  52. package/src/tool/email-list-cleaner/i18n/ko.ts +140 -0
  53. package/src/tool/email-list-cleaner/i18n/nl.ts +140 -0
  54. package/src/tool/email-list-cleaner/i18n/pl.ts +140 -0
  55. package/src/tool/email-list-cleaner/i18n/pt.ts +140 -0
  56. package/src/tool/email-list-cleaner/i18n/ru.ts +140 -0
  57. package/src/tool/email-list-cleaner/i18n/sv.ts +140 -0
  58. package/src/tool/email-list-cleaner/i18n/tr.ts +140 -0
  59. package/src/tool/email-list-cleaner/i18n/zh.ts +140 -0
  60. package/src/tool/email-list-cleaner/index.ts +12 -0
  61. package/src/tool/env-badge-spain/i18n/de.ts +153 -0
  62. package/src/tool/env-badge-spain/i18n/es.ts +1 -1
  63. package/src/tool/env-badge-spain/i18n/fr.ts +1 -1
  64. package/src/tool/env-badge-spain/i18n/id.ts +153 -0
  65. package/src/tool/env-badge-spain/i18n/it.ts +153 -0
  66. package/src/tool/env-badge-spain/i18n/ja.ts +153 -0
  67. package/src/tool/env-badge-spain/i18n/ko.ts +153 -0
  68. package/src/tool/env-badge-spain/i18n/nl.ts +153 -0
  69. package/src/tool/env-badge-spain/i18n/pl.ts +153 -0
  70. package/src/tool/env-badge-spain/i18n/pt.ts +153 -0
  71. package/src/tool/env-badge-spain/i18n/ru.ts +153 -0
  72. package/src/tool/env-badge-spain/i18n/sv.ts +153 -0
  73. package/src/tool/env-badge-spain/i18n/tr.ts +153 -0
  74. package/src/tool/env-badge-spain/i18n/zh.ts +153 -0
  75. package/src/tool/env-badge-spain/index.ts +12 -0
  76. package/src/tool/morse-beacon/i18n/de.ts +157 -0
  77. package/src/tool/morse-beacon/i18n/id.ts +157 -0
  78. package/src/tool/morse-beacon/i18n/it.ts +157 -0
  79. package/src/tool/morse-beacon/i18n/ja.ts +157 -0
  80. package/src/tool/morse-beacon/i18n/ko.ts +157 -0
  81. package/src/tool/morse-beacon/i18n/nl.ts +157 -0
  82. package/src/tool/morse-beacon/i18n/pl.ts +157 -0
  83. package/src/tool/morse-beacon/i18n/pt.ts +157 -0
  84. package/src/tool/morse-beacon/i18n/ru.ts +157 -0
  85. package/src/tool/morse-beacon/i18n/sv.ts +157 -0
  86. package/src/tool/morse-beacon/i18n/tr.ts +157 -0
  87. package/src/tool/morse-beacon/i18n/zh.ts +157 -0
  88. package/src/tool/morse-beacon/index.ts +13 -1
  89. package/src/tool/password-generator/i18n/de.ts +166 -0
  90. package/src/tool/password-generator/i18n/fr.ts +1 -1
  91. package/src/tool/password-generator/i18n/id.ts +166 -0
  92. package/src/tool/password-generator/i18n/it.ts +166 -0
  93. package/src/tool/password-generator/i18n/ja.ts +166 -0
  94. package/src/tool/password-generator/i18n/ko.ts +166 -0
  95. package/src/tool/password-generator/i18n/nl.ts +166 -0
  96. package/src/tool/password-generator/i18n/pl.ts +166 -0
  97. package/src/tool/password-generator/i18n/pt.ts +166 -0
  98. package/src/tool/password-generator/i18n/ru.ts +166 -0
  99. package/src/tool/password-generator/i18n/sv.ts +166 -0
  100. package/src/tool/password-generator/i18n/tr.ts +166 -0
  101. package/src/tool/password-generator/i18n/zh.ts +166 -0
  102. package/src/tool/password-generator/index.ts +13 -1
  103. package/src/tool/routes/i18n/de.ts +157 -0
  104. package/src/tool/routes/i18n/id.ts +157 -0
  105. package/src/tool/routes/i18n/it.ts +157 -0
  106. package/src/tool/routes/i18n/ja.ts +157 -0
  107. package/src/tool/routes/i18n/ko.ts +157 -0
  108. package/src/tool/routes/i18n/nl.ts +157 -0
  109. package/src/tool/routes/i18n/pl.ts +157 -0
  110. package/src/tool/routes/i18n/pt.ts +157 -0
  111. package/src/tool/routes/i18n/ru.ts +157 -0
  112. package/src/tool/routes/i18n/sv.ts +157 -0
  113. package/src/tool/routes/i18n/tr.ts +157 -0
  114. package/src/tool/routes/i18n/zh.ts +157 -0
  115. package/src/tool/routes/index.ts +13 -1
  116. package/src/tool/rule-of-three/i18n/de.ts +171 -0
  117. package/src/tool/rule-of-three/i18n/id.ts +171 -0
  118. package/src/tool/rule-of-three/i18n/it.ts +171 -0
  119. package/src/tool/rule-of-three/i18n/ja.ts +171 -0
  120. package/src/tool/rule-of-three/i18n/ko.ts +171 -0
  121. package/src/tool/rule-of-three/i18n/nl.ts +171 -0
  122. package/src/tool/rule-of-three/i18n/pl.ts +171 -0
  123. package/src/tool/rule-of-three/i18n/pt.ts +171 -0
  124. package/src/tool/rule-of-three/i18n/ru.ts +171 -0
  125. package/src/tool/rule-of-three/i18n/sv.ts +171 -0
  126. package/src/tool/rule-of-three/i18n/tr.ts +171 -0
  127. package/src/tool/rule-of-three/i18n/zh.ts +171 -0
  128. package/src/tool/rule-of-three/index.ts +13 -1
  129. package/src/tool/seo-content-optimizer/i18n/de.ts +136 -0
  130. package/src/tool/seo-content-optimizer/i18n/id.ts +136 -0
  131. package/src/tool/seo-content-optimizer/i18n/it.ts +136 -0
  132. package/src/tool/seo-content-optimizer/i18n/ja.ts +136 -0
  133. package/src/tool/seo-content-optimizer/i18n/ko.ts +136 -0
  134. package/src/tool/seo-content-optimizer/i18n/nl.ts +136 -0
  135. package/src/tool/seo-content-optimizer/i18n/pl.ts +136 -0
  136. package/src/tool/seo-content-optimizer/i18n/pt.ts +136 -0
  137. package/src/tool/seo-content-optimizer/i18n/ru.ts +136 -0
  138. package/src/tool/seo-content-optimizer/i18n/sv.ts +136 -0
  139. package/src/tool/seo-content-optimizer/i18n/tr.ts +136 -0
  140. package/src/tool/seo-content-optimizer/i18n/zh.ts +136 -0
  141. package/src/tool/seo-content-optimizer/index.ts +12 -0
  142. package/src/tool/speed-reader/i18n/de.ts +152 -0
  143. package/src/tool/speed-reader/i18n/id.ts +152 -0
  144. package/src/tool/speed-reader/i18n/it.ts +152 -0
  145. package/src/tool/speed-reader/i18n/ja.ts +152 -0
  146. package/src/tool/speed-reader/i18n/ko.ts +152 -0
  147. package/src/tool/speed-reader/i18n/nl.ts +152 -0
  148. package/src/tool/speed-reader/i18n/pl.ts +152 -0
  149. package/src/tool/speed-reader/i18n/pt.ts +152 -0
  150. package/src/tool/speed-reader/i18n/ru.ts +152 -0
  151. package/src/tool/speed-reader/i18n/sv.ts +152 -0
  152. package/src/tool/speed-reader/i18n/tr.ts +152 -0
  153. package/src/tool/speed-reader/i18n/zh.ts +152 -0
  154. package/src/tool/speed-reader/index.ts +12 -0
  155. package/src/tool/text-pixel-calculator/i18n/de.ts +133 -0
  156. package/src/tool/text-pixel-calculator/i18n/id.ts +133 -0
  157. package/src/tool/text-pixel-calculator/i18n/it.ts +133 -0
  158. package/src/tool/text-pixel-calculator/i18n/ja.ts +133 -0
  159. package/src/tool/text-pixel-calculator/i18n/ko.ts +133 -0
  160. package/src/tool/text-pixel-calculator/i18n/nl.ts +133 -0
  161. package/src/tool/text-pixel-calculator/i18n/pl.ts +133 -0
  162. package/src/tool/text-pixel-calculator/i18n/pt.ts +133 -0
  163. package/src/tool/text-pixel-calculator/i18n/ru.ts +133 -0
  164. package/src/tool/text-pixel-calculator/i18n/sv.ts +133 -0
  165. package/src/tool/text-pixel-calculator/i18n/tr.ts +133 -0
  166. package/src/tool/text-pixel-calculator/i18n/zh.ts +133 -0
  167. package/src/tool/text-pixel-calculator/index.ts +12 -0
  168. package/src/tool/whatsapp-link/i18n/de.ts +128 -0
  169. package/src/tool/whatsapp-link/i18n/id.ts +128 -0
  170. package/src/tool/whatsapp-link/i18n/it.ts +128 -0
  171. package/src/tool/whatsapp-link/i18n/ja.ts +128 -0
  172. package/src/tool/whatsapp-link/i18n/ko.ts +128 -0
  173. package/src/tool/whatsapp-link/i18n/nl.ts +128 -0
  174. package/src/tool/whatsapp-link/i18n/pl.ts +128 -0
  175. package/src/tool/whatsapp-link/i18n/pt.ts +128 -0
  176. package/src/tool/whatsapp-link/i18n/ru.ts +128 -0
  177. package/src/tool/whatsapp-link/i18n/sv.ts +128 -0
  178. package/src/tool/whatsapp-link/i18n/tr.ts +128 -0
  179. package/src/tool/whatsapp-link/i18n/zh.ts +128 -0
  180. package/src/tool/whatsapp-link/index.ts +12 -0
@@ -0,0 +1,133 @@
1
+ import type { ToolLocaleContent } from '../../../types';
2
+ import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
3
+ import type { TextPixelCalculatorUI } from '../ui';
4
+
5
+ const faqData = [
6
+ {
7
+ question: 'オンラインでテキストのピクセル幅を計算するにはどうすればよいですか?',
8
+ answer: '入力ボックスにテキストを貼り付け、フォントとサイズを設定してください。ツールがブラウザのCanvas APIを自動的に使用して、正確なピクセル幅を返します。',
9
+ },
10
+ {
11
+ question: 'なぜ書体によってピクセル幅が異なるのですか?',
12
+ answer: 'ほとんどのフォントは「プロポーショナルフォント」であり、各文字が異なる幅を持っています。例えば、標準的なサンセリフ体では、大文字の「M」は常に小文字の「i」よりも幅が広くなります。',
13
+ },
14
+ {
15
+ question: '文字数を測るのとピクセルを測るのは同じですか?',
16
+ answer: 'いいえ。文字数を測ると文字列の長さがわかりますが、ピクセルを測るとそれが占める視覚的なスペースがわかります。これは、Webデザインでテキストがコンテナからはみ出さないようにするために非常に重要です。',
17
+ },
18
+ {
19
+ question: 'Google Fontsの書体はどれでも使えますか?',
20
+ answer: 'はい。フォントがOSにインストールされているか、現在のページに読み込まれている限り、ツールはその寸法を正確に測定します。',
21
+ },
22
+ {
23
+ question: 'プライベートなテキストやコードスニペットを処理しても安全ですか?',
24
+ answer: 'はい。この計算機は完全にローカルで動作します。外部サーバーにデータが送信されることはないため、プロジェクトの完全なプライバシーが保証されます。',
25
+ },
26
+ ];
27
+
28
+ const howToData = [
29
+ { name: 'テキストを入力', text: '測定したいテキストを入力エリアに入力または貼り付けます。' },
30
+ { name: 'フォントを設定', text: 'フォントファミリー、ピクセル単位のサイズ、太さ、斜体かどうかを設定します。' },
31
+ { name: '結果を確認', text: 'ピクセル幅と文字数がリアルタイムで更新されます。' },
32
+ { name: '値をコピー', text: '「幅をコピー」をクリックして、ピクセル値をクリップボードに保存します。' },
33
+ ];
34
+
35
+ const faqSchema: WithContext<FAQPage> = {
36
+ '@context': 'https://schema.org',
37
+ '@type': 'FAQPage',
38
+ mainEntity: faqData.map((item) => ({
39
+ '@type': 'Question',
40
+ name: item.question,
41
+ acceptedAnswer: { '@type': 'Answer', text: item.answer },
42
+ })),
43
+ };
44
+
45
+ const howToSchema: WithContext<HowTo> = {
46
+ '@context': 'https://schema.org',
47
+ '@type': 'HowTo',
48
+ name: 'テキストのピクセル幅を測定する方法',
49
+ step: howToData.map((s) => ({ '@type': 'HowToStep', name: s.name, text: s.text })),
50
+ };
51
+
52
+ const appSchema: WithContext<SoftwareApplication> = {
53
+ '@context': 'https://schema.org',
54
+ '@type': 'SoftwareApplication',
55
+ name: 'テキストピクセル幅計算機',
56
+ applicationCategory: 'UtilitiesApplication',
57
+ operatingSystem: 'Web',
58
+ offers: { '@type': 'Offer', price: '0', priceCurrency: 'JPY' },
59
+ description: 'フォント、サイズ、スタイルに基づいて、あらゆるテキストのピクセル幅を正確に計算します。',
60
+ };
61
+
62
+ const ui: TextPixelCalculatorUI = {
63
+ textLabel: '測定するテキスト',
64
+ textPlaceholder: '測定したいテキストをここに入力または貼り付け...',
65
+ defaultText: 'こんにちは世界',
66
+ fontLabel: 'フォントファミリー',
67
+ sizeLabel: 'サイズ (px)',
68
+ weightLabel: '太さ',
69
+ italicLabel: '斜体',
70
+ widthLabel: '幅 (ピクセル)',
71
+ charsLabel: '文字数',
72
+ previewLabel: '視覚プレビュー',
73
+ copyBtn: '幅をコピー',
74
+ resetBtn: 'リセット',
75
+ copyDone: '幅をコピーしました',
76
+ };
77
+
78
+ export const content: ToolLocaleContent<TextPixelCalculatorUI> = {
79
+ slug: 'text-pixel-width-calculator',
80
+ title: 'テキストピクセル幅計算機',
81
+ description: 'フォント、サイズ、スタイルに基づいて、テキストがピクセル単位でどれくらいの幅になるかを正確に計算します。デザイナーや開発者のための無料ツールです。',
82
+ ui,
83
+ faqTitle: 'よくある質問',
84
+ faq: faqData,
85
+ howTo: howToData,
86
+ bibliographyTitle: '参考文献',
87
+ bibliography: [
88
+ { name: 'W3C: CSS Text Module Level 3', url: 'https://www.w3.org/TR/css-text-3/' },
89
+ { name: 'Google Fonts: 可変フォントについて', url: 'https://fonts.google.com/knowledge/glossary/variable_fonts' },
90
+ ],
91
+ schemas: [faqSchema, howToSchema, appSchema],
92
+ seo: [
93
+ { type: 'title', level: 2, text: 'あらゆるテキストの正確なピクセル幅を測定' },
94
+ {
95
+ type: 'paragraph',
96
+ html: 'テキストがコンテナからはみ出していませんか?レンダリング前に見出しがどれくらいのスペースを占めるか知る必要がありますか?<strong>ブラウザのCanvas API</strong>を使用すると、DOMにレンダリングすることなく、ピクセル精度でテキスト文字列の正確な幅を測定できます。',
97
+ },
98
+ { type: 'title', level: 3, text: 'なぜ文字数カウントだけでは不十分なのか' },
99
+ {
100
+ type: 'paragraph',
101
+ html: '現代の書体は固定幅ではなく<strong>プロポーショナル(比例)</strong>です。各文字は異なる幅を持っています。「W」は「i」の3倍以上のスペースを占めることがあります。文字数だけでは、テキストが実際に占める視覚的なスペースについては何もわかりません。',
102
+ },
103
+ {
104
+ type: 'list',
105
+ items: [
106
+ '<strong>Webデザイン:</strong>ボタン、ラベル、表のセルでのオーバーフローを防ぎます。',
107
+ '<strong>SEO:</strong>検索エンジンはタイトルを文字数ではなくピクセル単位で切り捨てます。',
108
+ '<strong>CanvasとPDF:</strong>プログラムでテキストを描画する前に正確な位置を計算します。',
109
+ '<strong>ツールチップと吹き出し:</strong>内部テキストに基づいてコンテナのサイズを動的に変更します。',
110
+ ],
111
+ },
112
+ { type: 'title', level: 3, text: 'Canvasによる測定の仕組み' },
113
+ {
114
+ type: 'paragraph',
115
+ html: 'Canvas APIの<code>ctx.measureText()</code>メソッドは、現在アクティブなフォントを使用したCSSピクセル幅を反映する<code>width</code>プロパティを持つ<code>TextMetrics</code>オブジェクトを返します。このツールは、測定前にフォント、サイズ、太さ、スタイルを使用してコンテキストを設定します。',
116
+ },
117
+ {
118
+ type: 'code',
119
+ ariaLabel: 'Canvas measureText の例',
120
+ code: "const ctx = document.createElement('canvas').getContext('2d');\nctx.font = '700 16px Inter, system-ui, sans-serif';\nconst width = ctx.measureText('こんにちは世界').width; // 例: 74.5",
121
+ },
122
+ { type: 'title', level: 3, text: 'プライバシーとローカル処理' },
123
+ {
124
+ type: 'paragraph',
125
+ html: 'すべての計算はブラウザ内で行われます。テキスト、コードスニペット、個人データがデバイスから送信されることはありません。',
126
+ },
127
+ {
128
+ type: 'tip',
129
+ title: 'Google Fontsの書体',
130
+ html: 'Google Fontsの書体を正確に測定するには、まずそのフォントがページに読み込まれているか、システムにインストールされていることを確認してください。そうでない場合、ブラウザは代替フォントを使用するため、結果が異なります。',
131
+ },
132
+ ],
133
+ };
@@ -0,0 +1,133 @@
1
+ import type { ToolLocaleContent } from '../../../types';
2
+ import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
3
+ import type { TextPixelCalculatorUI } from '../ui';
4
+
5
+ const faqData = [
6
+ {
7
+ question: '온라인에서 텍스트의 픽셀 너비를 어떻게 계산하나요?',
8
+ answer: '입력 상자에 텍스트를 붙여넣고 글꼴과 크기를 설정하면 도구가 브라우저 Canvas API를 자동으로 사용하여 정확한 너비를 픽셀 단위로 반환합니다.',
9
+ },
10
+ {
11
+ question: '서체마다 픽셀 너비가 다른 이유는 무엇인가요?',
12
+ answer: "대부분의 글꼴은 가변 너비(proportional)를 가지므로 각 문자마다 너비가 다릅니다. 예를 들어, 표준 산세리프 글꼴에서 대문자 'M'은 항상 소문자 'i'보다 넓습니다.",
13
+ },
14
+ {
15
+ question: '글자 수를 측정하는 것과 픽셀을 측정하는 것이 같나요?',
16
+ answer: '아니요. 글자 수를 측정하면 문자열 길이를 알 수 있지만, 픽셀을 측정하면 텍스트가 차지하는 시각적 공간을 알 수 있습니다. 이는 웹 디자인에서 텍스트가 컨테이너를 벗어나지 않도록 하는 데 결정적입니다.',
17
+ },
18
+ {
19
+ question: '모든 Google Fonts 서체를 사용할 수 있나요?',
20
+ answer: '네, 글꼴이 운영 체제에 설치되어 있거나 현재 페이지에 로드되어 있는 한 도구는 치수를 정확하게 측정합니다.',
21
+ },
22
+ {
23
+ question: '개인 텍스트나 코드 스니펫을 처리해도 안전한가요?',
24
+ answer: '네. 계산기는 완전히 로컬에서 작동합니다. 외부 서버로 데이터가 전송되지 않으므로 프로젝트에 대한 완전한 프라이버시가 보장됩니다.',
25
+ },
26
+ ];
27
+
28
+ const howToData = [
29
+ { name: '텍스트 입력', text: '측정하려는 텍스트를 입력 영역에 입력하거나 붙여넣으세요.' },
30
+ { name: '글꼴 설정', text: '글꼴 모음, 픽셀 단위 크기, 두께 및 기울임꼴 여부를 설정합니다.' },
31
+ { name: '결과 확인', text: '픽셀 너비와 글자 수가 실시간으로 업데이트됩니다.' },
32
+ { name: '값 복사', text: '"너비 복사"를 클릭하여 픽셀 숫자를 클립보드에 저장합니다.' },
33
+ ];
34
+
35
+ const faqSchema: WithContext<FAQPage> = {
36
+ '@context': 'https://schema.org',
37
+ '@type': 'FAQPage',
38
+ mainEntity: faqData.map((item) => ({
39
+ '@type': 'Question',
40
+ name: item.question,
41
+ acceptedAnswer: { '@type': 'Answer', text: item.answer },
42
+ })),
43
+ };
44
+
45
+ const howToSchema: WithContext<HowTo> = {
46
+ '@context': 'https://schema.org',
47
+ '@type': 'HowTo',
48
+ name: '텍스트 너비를 픽셀 단위로 측정하는 방법',
49
+ step: howToData.map((s) => ({ '@type': 'HowToStep', name: s.name, text: s.text })),
50
+ };
51
+
52
+ const appSchema: WithContext<SoftwareApplication> = {
53
+ '@context': 'https://schema.org',
54
+ '@type': 'SoftwareApplication',
55
+ name: '텍스트 픽셀 너비 계산기',
56
+ applicationCategory: 'UtilitiesApplication',
57
+ operatingSystem: 'Web',
58
+ offers: { '@type': 'Offer', price: '0', priceCurrency: 'KRW' },
59
+ description: '글꼴, 크기 및 스타일에 따라 텍스트의 픽셀 너비를 정확하게 계산합니다.',
60
+ };
61
+
62
+ const ui: TextPixelCalculatorUI = {
63
+ textLabel: '측정할 텍스트',
64
+ textPlaceholder: '측정하려는 텍스트를 여기에 입력하거나 붙여넣으세요...',
65
+ defaultText: '안녕 세상',
66
+ fontLabel: '글꼴 모음',
67
+ sizeLabel: '크기 (px)',
68
+ weightLabel: '두께',
69
+ italicLabel: '기울임꼴',
70
+ widthLabel: '너비 (픽셀)',
71
+ charsLabel: '글자 수',
72
+ previewLabel: '시각적 미리보기',
73
+ copyBtn: '너비 복사',
74
+ resetBtn: '초기화',
75
+ copyDone: '너비가 복사되었습니다',
76
+ };
77
+
78
+ export const content: ToolLocaleContent<TextPixelCalculatorUI> = {
79
+ slug: 'text-pixel-width-calculator',
80
+ title: '텍스트 픽셀 너비 계산기',
81
+ description: '글꼴, 크기 및 스타일에 따라 텍스트가 픽셀 단위로 얼마나 넓은지 정확하게 계산합니다. 디자이너와 개발자를 위한 무료 도구입니다.',
82
+ ui,
83
+ faqTitle: '자주 묻는 질문',
84
+ faq: faqData,
85
+ howTo: howToData,
86
+ bibliographyTitle: '참고 문헌',
87
+ bibliography: [
88
+ { name: 'W3C: CSS Text Module Level 3', url: 'https://www.w3.org/TR/css-text-3/' },
89
+ { name: 'Google Fonts: 가변 글꼴 이해하기', url: 'https://fonts.google.com/knowledge/glossary/variable_fonts' },
90
+ ],
91
+ schemas: [faqSchema, howToSchema, appSchema],
92
+ seo: [
93
+ { type: 'title', level: 2, text: '모든 텍스트의 정확한 픽셀 너비 측정' },
94
+ {
95
+ type: 'paragraph',
96
+ html: '텍스트가 컨테이너를 벗어나나요? 렌더링하기 전에 제목이 차지하는 공간을 알아야 하나요? <strong>브라우저 Canvas API</strong>를 사용하면 DOM에 렌더링하지 않고도 픽셀 정밀도로 텍스트 문자열의 정확한 너비를 측정할 수 있습니다.',
97
+ },
98
+ { type: 'title', level: 3, text: '글자 수 계산만으로 부족한 이유' },
99
+ {
100
+ type: 'paragraph',
101
+ html: '현대 서체는 <strong>가변 너비</strong>를 가집니다. 각 글리프마다 너비가 다릅니다. "W"는 "i"보다 3배 더 많은 공간을 차지할 수 있습니다. 글자 수는 텍스트가 실제로 차지하는 시각적 공간에 대해 아무것도 알려주지 않습니다.',
102
+ },
103
+ {
104
+ type: 'list',
105
+ items: [
106
+ '<strong>웹 디자인:</strong> 버튼, 레이블 및 테이블 셀의 텍스트 넘침(overflow)을 방지합니다.',
107
+ '<strong>SEO:</strong> 검색 엔진은 글자 수가 아니라 픽셀 단위로 제목을 자릅니다.',
108
+ '<strong>Canvas 및 PDF:</strong> 프로그래밍 방식으로 텍스트를 그리기 전에 정확한 위치를 계산합니다.',
109
+ '<strong>툴팁 및 버블:</strong> 내부 텍스트에 따라 컨테이너 크기를 동적으로 조정합니다.',
110
+ ],
111
+ },
112
+ { type: 'title', level: 3, text: 'Canvas를 이용한 측정 방법' },
113
+ {
114
+ type: 'paragraph',
115
+ html: 'Canvas API의 <code>ctx.measureText()</code> 메서드는 현재 활성화된 글꼴을 사용하여 CSS 픽셀 너비를 반영하는 <code>width</code> 속성을 가진 <code>TextMetrics</code> 객체를 반환합니다. 이 도구는 측정 전에 글꼴, 크기, 두께 및 스타일로 컨텍스트를 구성합니다.',
116
+ },
117
+ {
118
+ type: 'code',
119
+ ariaLabel: 'Canvas measureText 예시',
120
+ code: "const ctx = document.createElement('canvas').getContext('2d');\nctx.font = '700 16px Inter, system-ui, sans-serif';\nconst width = ctx.measureText('안녕 세상').width; // 예: 74.5",
121
+ },
122
+ { type: 'title', level: 3, text: '프라이버시 및 로컬 처리' },
123
+ {
124
+ type: 'paragraph',
125
+ html: '모든 계산은 브라우저에서 이루어집니다. 텍스트, 코드 스니펫 또는 개인 데이터는 장치를 떠나지 않습니다.',
126
+ },
127
+ {
128
+ type: 'tip',
129
+ title: 'Google Fonts 서체',
130
+ html: 'Google Fonts 서체를 정확하게 측정하려면 먼저 해당 글꼴이 페이지에 로드되어 있거나 시스템에 설치되어 있는지 확인하세요. 그렇지 않으면 브라우저가 대체 글꼴을 사용하게 되어 결과가 달라집니다.',
131
+ },
132
+ ],
133
+ };
@@ -0,0 +1,133 @@
1
+ import type { ToolLocaleContent } from '../../../types';
2
+ import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
3
+ import type { TextPixelCalculatorUI } from '../ui';
4
+
5
+ const faqData = [
6
+ {
7
+ question: 'Hoe bereken ik online de pixelbreedte van tekst?',
8
+ answer: 'Plak uw tekst in het invoervak, configureer het lettertype en de grootte, en de tool gebruikt automatisch de Canvas API van de browser om de exacte breedte in pixels te retourneren.',
9
+ },
10
+ {
11
+ question: 'Waarom varieert de pixelbreedte tussen verschillende lettertypen?',
12
+ answer: "De meeste lettertypen zijn proportioneel, wat betekent dat elk teken een andere breedte heeft. Een hoofdletter 'M' is bijvoorbeeld altijd breder dan een kleine letter 'i' in een standaard sans-serif lettertype.",
13
+ },
14
+ {
15
+ question: 'Is het meten van tekens hetzelfde als het meten van pixels?',
16
+ answer: 'Nee. Het meten van tekens geeft u de lengte van de reeks, terwijl het meten van pixels u de visuele ruimte geeft die het inneemt. Dit is cruciaal om ervoor te zorgen dat tekst in een webontwerp niet buiten zijn container valt.',
17
+ },
18
+ {
19
+ question: 'Kan ik elk Google Fonts-lettertype gebruiken?',
20
+ answer: 'Ja, zolang het lettertype op uw besturingssysteem is geïnstalleerd of op de huidige pagina is geladen, zal de tool de afmetingen nauwkeurig meten.',
21
+ },
22
+ {
23
+ question: 'Is het veilig om privetekst of codefragmenten te verwerken?',
24
+ answer: 'Ja. De calculator werkt volledig lokaal. Er worden geen gegevens naar externe servers verzonden, wat volledige privacy voor uw projecten garandeert.',
25
+ },
26
+ ];
27
+
28
+ const howToData = [
29
+ { name: 'Voer de tekst in', text: 'Typ of plak de tekst die u wilt meten in het invoerveld.' },
30
+ { name: 'Configureer het lettertype', text: 'Stel de lettertypefamilie, grootte in pixels, dikte in en of het cursief is.' },
31
+ { name: 'Lees het resultaat', text: 'De pixelbreedte en het aantal tekens worden in realtime bijgewerkt.' },
32
+ { name: 'Kopieer de waarde', text: 'Klik op "Breedte kopiëren" om het aantal pixels naar het klembord te kopiëren.' },
33
+ ];
34
+
35
+ const faqSchema: WithContext<FAQPage> = {
36
+ '@context': 'https://schema.org',
37
+ '@type': 'FAQPage',
38
+ mainEntity: faqData.map((item) => ({
39
+ '@type': 'Question',
40
+ name: item.question,
41
+ acceptedAnswer: { '@type': 'Answer', text: item.answer },
42
+ })),
43
+ };
44
+
45
+ const howToSchema: WithContext<HowTo> = {
46
+ '@context': 'https://schema.org',
47
+ '@type': 'HowTo',
48
+ name: 'Hoe de tekstbreedte in pixels te meten',
49
+ step: howToData.map((s) => ({ '@type': 'HowToStep', name: s.name, text: s.text })),
50
+ };
51
+
52
+ const appSchema: WithContext<SoftwareApplication> = {
53
+ '@context': 'https://schema.org',
54
+ '@type': 'SoftwareApplication',
55
+ name: 'Tekst Pixelbreedte Calculator',
56
+ applicationCategory: 'UtilitiesApplication',
57
+ operatingSystem: 'Web',
58
+ offers: { '@type': 'Offer', price: '0', priceCurrency: 'EUR' },
59
+ description: 'Bereken nauwkeurig de pixelbreedte van elke tekst op basis van lettertype, grootte en stijl.',
60
+ };
61
+
62
+ const ui: TextPixelCalculatorUI = {
63
+ textLabel: 'Te meten tekst',
64
+ textPlaceholder: 'Typ of plak hier de tekst die u wilt meten...',
65
+ defaultText: 'Hallo Wereld',
66
+ fontLabel: 'Lettertypefamilie',
67
+ sizeLabel: 'Grootte (px)',
68
+ weightLabel: 'Dikte',
69
+ italicLabel: 'Cursief',
70
+ widthLabel: 'Breedte (pixels)',
71
+ charsLabel: 'Tekens',
72
+ previewLabel: 'Visueel voorbeeld',
73
+ copyBtn: 'Breedte kopiëren',
74
+ resetBtn: 'Resetten',
75
+ copyDone: 'Breedte gekopieerd',
76
+ };
77
+
78
+ export const content: ToolLocaleContent<TextPixelCalculatorUI> = {
79
+ slug: 'text-pixel-breedte-calculator',
80
+ title: 'Tekst Pixelbreedte Calculator',
81
+ description: 'Bereken nauwkeurig hoe breed een tekst in pixels is op basis van lettertype, grootte en stijl. Gratis tool voor ontwerpers en ontwikkelaars.',
82
+ ui,
83
+ faqTitle: 'Veelgestelde Vragen',
84
+ faq: faqData,
85
+ howTo: howToData,
86
+ bibliographyTitle: 'Referenties',
87
+ bibliography: [
88
+ { name: 'W3C: CSS Text Module Level 3', url: 'https://www.w3.org/TR/css-text-3/' },
89
+ { name: 'Google Fonts: Understanding variable fonts', url: 'https://fonts.google.com/knowledge/glossary/variable_fonts' },
90
+ ],
91
+ schemas: [faqSchema, howToSchema, appSchema],
92
+ seo: [
93
+ { type: 'title', level: 2, text: 'Meet de exacte pixelbreedte van elke tekst' },
94
+ {
95
+ type: 'paragraph',
96
+ html: 'Valt uw tekst buiten de container? Moet u weten hoeveel ruimte een kop inneemt voordat u deze rendert? De <strong>Canvas API van de browser</strong> stelt u in staat om de exacte breedte van elke tekstreeks met pixelprecisie te meten, zonder deze in de DOM te renderen.',
97
+ },
98
+ { type: 'title', level: 3, text: 'Waarom het tellen van tekens niet genoeg is' },
99
+ {
100
+ type: 'paragraph',
101
+ html: 'Moderne lettertypen zijn <strong>proportioneel</strong>: elk glyph heeft een andere breedte. Een "W" kan drie keer meer ruimte innemen dan een "i". Het aantal tekens zegt niets over de werkelijke visuele ruimte die de tekst inneemt.',
102
+ },
103
+ {
104
+ type: 'list',
105
+ items: [
106
+ '<strong>Webontwerp:</strong> Voorkom overflow in knoppen, labels en tabelcellen.',
107
+ '<strong>SEO:</strong> Zoekmachines kappen titels af op basis van pixels, niet op basis van tekens.',
108
+ '<strong>Canvas en PDF:</strong> Bereken de exacte positie voordat u tekst programmatisch tekent.',
109
+ '<strong>Tooltips en bubbels:</strong> Pas de grootte van containers dynamisch aan op basis van de binnenste tekst.',
110
+ ],
111
+ },
112
+ { type: 'title', level: 3, text: 'Hoe meten met Canvas werkt' },
113
+ {
114
+ type: 'paragraph',
115
+ html: 'De methode <code>ctx.measureText()</code> van de Canvas API retourneert een <code>TextMetrics</code>-object met een <code>width</code>-eigenschap die de CSS-pixelbreedte weergeeft met het momenteel actieve lettertype. Deze tool configureert de context met uw lettertype, grootte, dikte en stijl voordat er wordt gemeten.',
116
+ },
117
+ {
118
+ type: 'code',
119
+ ariaLabel: 'Canvas measureText voorbeeld',
120
+ code: "const ctx = document.createElement('canvas').getContext('2d');\nctx.font = '700 16px Inter, system-ui, sans-serif';\nconst width = ctx.measureText('Hallo Wereld').width; // bijv. 74.5",
121
+ },
122
+ { type: 'title', level: 3, text: 'Privacy en lokale verwerking' },
123
+ {
124
+ type: 'paragraph',
125
+ html: 'Alle berekeningen vinden plaats in uw browser. Geen enkele tekst, codefragment of privégegevens verlaat uw apparaat.',
126
+ },
127
+ {
128
+ type: 'tip',
129
+ title: 'Google Fonts lettertypen',
130
+ html: 'Om een Google Fonts-lettertype nauwkeurig te meten, moet u er eerst voor zorgen dat het op de pagina is geladen of op uw systeem is geïnstalleerd. Anders valt de browser terug op een vervangend lettertype en zal het resultaat afwijken.',
131
+ },
132
+ ],
133
+ };
@@ -0,0 +1,133 @@
1
+ import type { ToolLocaleContent } from '../../../types';
2
+ import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
3
+ import type { TextPixelCalculatorUI } from '../ui';
4
+
5
+ const faqData = [
6
+ {
7
+ question: 'Jak obliczyć szerokość tekstu w pikselach online?',
8
+ answer: 'Wklej tekst do pola wejściowego, skonfiguruj czcionkę i rozmiar, a narzędzie automatycznie użyje interfejsu API Canvas przeglądarki, aby zwrócić dokładną szerokość w pikselach.',
9
+ },
10
+ {
11
+ question: 'Dlaczego szerokość w pikselach różni się między krojami pisma?',
12
+ answer: 'Większość czcionek jest proporcjonalna, co oznacza, że każdy znak ma inną szerokość. Na przykład wielka litera „M” jest zawsze szersza niż mała litera „i” w standardowej czcionce bezszeryfowej.',
13
+ },
14
+ {
15
+ question: 'Czy mierzenie znaków to to samo co mierzenie pikseli?',
16
+ answer: 'Nie. Mierzenie znaków podaje długość ciągu, natomiast mierzenie pikseli podaje przestrzeń wizualną, jaką on zajmuje. Jest to kluczowe dla upewnienia się, że tekst nie wystaje poza swój kontener w projekcie internetowym.',
17
+ },
18
+ {
19
+ question: 'Czy mogę użyć dowolnego kroju pisma z Google Fonts?',
20
+ answer: 'Tak, o ile czcionka jest zainstalowana w systemie operacyjnym lub załadowana na bieżącej stronie, narzędzie dokładnie zmierzy jej wymiary.',
21
+ },
22
+ {
23
+ question: 'Czy przetwarzanie prywatnego tekstu lub fragmentów kodu jest bezpieczne?',
24
+ answer: 'Tak. Kalkulator działa całkowicie lokalnie. Żadne dane nie są wysyłane do zewnętrznych serwerów, co gwarantuje pełną prywatność Twoich projektów.',
25
+ },
26
+ ];
27
+
28
+ const howToData = [
29
+ { name: 'Wpisz tekst', text: 'Wpisz lub wklej tekst, który chcesz zmierzyć, w obszarze wejściowym.' },
30
+ { name: 'Skonfiguruj czcionkę', text: 'Ustaw rodzinę czcionek, rozmiar w pikselach, wagę i to, czy ma być pochylona.' },
31
+ { name: 'Odczytaj wynik', text: 'Szerokość w pikselach i liczba znaków są aktualizowane w czasie rzeczywistym.' },
32
+ { name: 'Skopiuj wartość', text: 'Kliknij „Kopiuj szerokość”, aby zapisać liczbę pikseli w schowku.' },
33
+ ];
34
+
35
+ const faqSchema: WithContext<FAQPage> = {
36
+ '@context': 'https://schema.org',
37
+ '@type': 'FAQPage',
38
+ mainEntity: faqData.map((item) => ({
39
+ '@type': 'Question',
40
+ name: item.question,
41
+ acceptedAnswer: { '@type': 'Answer', text: item.answer },
42
+ })),
43
+ };
44
+
45
+ const howToSchema: WithContext<HowTo> = {
46
+ '@context': 'https://schema.org',
47
+ '@type': 'HowTo',
48
+ name: 'Jak zmierzyć szerokość tekstu w pikselach',
49
+ step: howToData.map((s) => ({ '@type': 'HowToStep', name: s.name, text: s.text })),
50
+ };
51
+
52
+ const appSchema: WithContext<SoftwareApplication> = {
53
+ '@context': 'https://schema.org',
54
+ '@type': 'SoftwareApplication',
55
+ name: 'Kalkulator szerokości pikseli tekstu',
56
+ applicationCategory: 'UtilitiesApplication',
57
+ operatingSystem: 'Web',
58
+ offers: { '@type': 'Offer', price: '0', priceCurrency: 'EUR' },
59
+ description: 'Dokładnie oblicz szerokość dowolnego tekstu w pikselach na podstawie czcionki, rozmiaru i stylu.',
60
+ };
61
+
62
+ const ui: TextPixelCalculatorUI = {
63
+ textLabel: 'Tekst do zmierzenia',
64
+ textPlaceholder: 'Wpisz lub wklej tutaj tekst, który chcesz zmierzyć...',
65
+ defaultText: 'Witaj świecie',
66
+ fontLabel: 'Rodzina czcionek',
67
+ sizeLabel: 'Rozmiar (px)',
68
+ weightLabel: 'Waga',
69
+ italicLabel: 'Kursywa',
70
+ widthLabel: 'Szerokość (piksele)',
71
+ charsLabel: 'Znaki',
72
+ previewLabel: 'Podgląd wizualny',
73
+ copyBtn: 'Kopiuj szerokość',
74
+ resetBtn: 'Resetuj',
75
+ copyDone: 'Szerokość skopiowana',
76
+ };
77
+
78
+ export const content: ToolLocaleContent<TextPixelCalculatorUI> = {
79
+ slug: 'kalkulator-szerokosci-pikseli-tekstu',
80
+ title: 'Kalkulator szerokości pikseli tekstu',
81
+ description: 'Dokładnie oblicz, jak szeroki jest dowolny tekst w pikselach na podstawie czcionki, rozmiaru i stylu. Darmowe narzędzie dla projektantów i programistów.',
82
+ ui,
83
+ faqTitle: 'Często zadawane pytania',
84
+ faq: faqData,
85
+ howTo: howToData,
86
+ bibliographyTitle: 'Źródła',
87
+ bibliography: [
88
+ { name: 'W3C: CSS Text Module Level 3', url: 'https://www.w3.org/TR/css-text-3/' },
89
+ { name: 'Google Fonts: Understanding variable fonts', url: 'https://fonts.google.com/knowledge/glossary/variable_fonts' },
90
+ ],
91
+ schemas: [faqSchema, howToSchema, appSchema],
92
+ seo: [
93
+ { type: 'title', level: 2, text: 'Zmierz dokładną szerokość dowolnego tekstu w pikselach' },
94
+ {
95
+ type: 'paragraph',
96
+ html: 'Czy Twój tekst wystaje poza swój kontener? Musisz wiedzieć, ile miejsca zajmuje nagłówek przed jego wyrenderowaniem? Interfejs <strong>API Canvas przeglądarki</strong> umożliwia pomiar dokładnej szerokości dowolnego ciągu tekstowego z precyzją piksela, bez renderowania go w DOM.',
97
+ },
98
+ { type: 'title', level: 3, text: 'Dlaczego liczenie znaków nie wystarczy' },
99
+ {
100
+ type: 'paragraph',
101
+ html: 'Nowoczesne kroje pisma są <strong>proporcjonalne</strong>: każdy glif ma inną szerokość. Litera „W” może zajmować trzy razy więcej miejsca niż „i”. Liczba znaków nic nie mówi o rzeczywistej przestrzeni wizualnej, jaką zajmuje tekst.',
102
+ },
103
+ {
104
+ type: 'list',
105
+ items: [
106
+ '<strong>Projektowanie stron www:</strong> Zapobiegaj przepełnieniu przycisków, etykiet i komórek tabel.',
107
+ '<strong>SEO:</strong> Wyszukiwarki ucinają tytuły według pikseli, a nie znaków.',
108
+ '<strong>Canvas i PDF:</strong> Oblicz dokładną pozycję przed programowym narysowaniem tekstu.',
109
+ '<strong>Tooltipy i dymki:</strong> Dynamicznie zmieniaj rozmiar kontenerów na podstawie tekstu wewnętrznego.',
110
+ ],
111
+ },
112
+ { type: 'title', level: 3, text: 'Jak działa pomiar za pomocą Canvas' },
113
+ {
114
+ type: 'paragraph',
115
+ html: 'Metoda <code>ctx.measureText()</code> interfejsu API Canvas zwraca obiekt <code>TextMetrics</code> z właściwością <code>width</code> odzwierciedlającą szerokość w pikselach CSS przy użyciu aktualnie aktywnej czcionki. To narzędzie konfiguruje kontekst z Twoją czcionką, rozmiarem, wagą i stylem przed pomiarem.',
116
+ },
117
+ {
118
+ type: 'code',
119
+ ariaLabel: 'Przykład Canvas measureText',
120
+ code: "const ctx = document.createElement('canvas').getContext('2d');\nctx.font = '700 16px Inter, system-ui, sans-serif';\nconst width = ctx.measureText('Witaj świecie').width; // np. 74.5",
121
+ },
122
+ { type: 'title', level: 3, text: 'Prywatność i przetwarzanie lokalne' },
123
+ {
124
+ type: 'paragraph',
125
+ html: 'Wszystkie obliczenia odbywają się w Twojej przeglądarce. Żaden tekst, fragment kodu ani prywatne dane nie opuszczają Twojego urządzenia.',
126
+ },
127
+ {
128
+ type: 'tip',
129
+ title: 'Kroje pisma Google Fonts',
130
+ html: 'Aby dokładnie zmierzyć krój pisma Google Fonts, najpierw upewnij się, że jest on załadowany na stronie lub zainstalowany w systemie. W przeciwnym razie przeglądarka użyje czcionki zastępczej i wynik będzie się różnił.',
131
+ },
132
+ ],
133
+ };