字體設計與文字編碼
HW01 - 字元編碼
國立臺北科技大學資訊工程系
「瀨戶字體」大家族
P.2
瀨戶字體(瀬戸フォント)
SetoFont
01
章節 01
瀨戶字體
P.4
原文出處: cjkfonts 全瀨體 https://free.com.tw/naikaifont/
瀨戶字體
P.5
原文出處: cjkfonts 全瀨體 https://free.com.tw/naikaifont/
cjkfonts 全瀨體、內海字體、小賴字體
P.6
02
章節 02
cjkfonts
P.7
原文出處: cjkfonts 全瀨體 https://cjkfonts.io/blog/cjkfonts_allseto
cjkfonts 全瀨體
P.8
原文出處: cjkfonts 全瀨體 https://cjkfonts.io/blog/cjkfonts_allseto
cjkfonts 全瀨體
P.9
原文出處: cjkfonts 全瀨體 https://cjkfonts.io/blog/cjkfonts_allseto
cjkfonts 全瀨體
P.10
原文出處: cjkfonts 全瀨體 https://cjkfonts.io/blog/cjkfonts_allseto
cjkFonts的字體是 由「誰」製作?
P.11
cjkFonts的字體是 由「誰」製作?
P.12
cjkfonts 全瀨體
P.13
原文出處: cjkfonts 全瀨體 https://cjkfonts.io/blog/cjkfonts_allseto
cjkfonts 全瀨體
以下是造字的過程 :
1. 深度學習訓練: 這過程是教電腦學習字型的特點及風格,就像教小明友學寫字一樣。電腦要24小時不停訓練,一般訓練3至4天,初步字體成形。
2. 調整字體: 訓練完成後,檢視產生的字體,如果有變形的情況,就人手修正。
P.14
原文出處: cjkfonts 全瀨體 https://cjkfonts.io/blog/cjkfonts_allseto
cjkfonts 全瀨體
3a. 再訓練: 修正後的新字體,再加入訓練,重復步驟一,讓機器學習新的字型特點。
3b. 再訓練” 反復一至三的步驟,當產生的字型達到滿意效果,然後就可以產生全部字型。
P.15
原文出處: cjkfonts 全瀨體 https://cjkfonts.io/blog/cjkfonts_allseto
cjkfonts 全瀨體
4. 篩選及調整: 產生的字體數量大約4萬2千個字左右,當中會有一些字是變形的,要篩選出來再人工調整,這個步驟工作量是非常大及花費大量時間的。
5. 輸出字體檔案: 使用軟件組合字體,然後輸出字體檔案(ttf)。
P.16
原文出處: cjkfonts 全瀨體 https://cjkfonts.io/blog/cjkfonts_allseto
cjkfonts 全瀨體
P.17
原文出處: cjkfonts 全瀨體 https://cjkfonts.io/blog/cjkfonts_allseto
cjkfonts 全瀨體
P.18
原文出處: cjkfonts 全瀨體 https://cjkfonts.io/blog/cjkfonts_allseto
cjkfonts 全瀨體
P.19
原文出處: cjkfonts 全瀨體 https://cjkfonts.io/blog/cjkfonts_allseto
cjkfonts 全瀨體
P.20
原文出處: cjkfonts 全瀨體 https://cjkfonts.io/blog/cjkfonts_allseto
「內海字體」
P.21
原文出處: cjkfonts 全瀨體 https://free.com.tw/naikaifont/
「小賴字體」
P.22
「小賴字體」
P.23
「小賴字體」
P.24
(a) Unicode 輸入法練習
P.25
章節 05
Unicode 輸入法練習
P.26
工具一
P.27
工具一
P.28
移動到你的字,按右鍵選[詳細資料]
P.29
工具二
P.30
工具二
P.31
工具二
P.32
工具二
P.33
工具三 (字變數)
P.34
工具三 (數變字)
P.35
工具三
P.36
字元實體 Character Entities
P.37
https://www.cnblogs.com/philipding/p/10153094.html
字元實體 Character Entities
P.38
https://www.cnblogs.com/philipding/p/10153094.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title></title>
</head>
<body>
<h1>
蘇
東
坡
</h1>
</body>
</html>
工具三
P.39
Supplementary Special Use Plane
Basic Multilingual Plane (BMP)
Private Use Planes
SIP (Supplementary Ideographic Plane)
SMP (Supplementary Multilingual Plane)
65,536 code points
工具三
P.40
https://zh.wikipedia.org/wiki/Unicode%E5%AD%97%E7%AC%A6%E5%B9%B3%E9%9D%A2%E6%98%A0%E5%B0%84
平面 | 始末字元值 | 中文名稱 | 英文名稱 |
0號平面 | U+0000 - U+FFFF | 基本多文種平面 | Basic Multilingual Plane,簡稱BMP |
1號平面 | U+10000 - U+1FFFF | 多文種補充平面 | Supplementary Multilingual Plane,簡稱SMP |
2號平面 | U+20000 - U+2FFFF | 表意文字補充平面 | Supplementary Ideographic Plane,簡稱SIP |
3號平面 | U+30000 - U+3FFFF | 表意文字第三平面 | Tertiary Ideographic Plane,簡稱TIP |
4號平面�至�13號平面 | U+40000 - U+DFFFF | (尚未使用) | |
14號平面 | U+E0000 - U+EFFFF | 特別用途補充平面 | Supplementary Special-purpose Plane,簡稱SSP |
15號平面 | U+F0000 - U+FFFFF | 保留作為私人使用區(A區)[1] | Private Use Area-A,簡稱PUA-A |
16號平面 | U+100000 - U+10FFFF | 保留作為私人使用區(B區)[1] | Private Use Area-B,簡稱PUA-B |
工具三
Plane Name Abbr. Characters Blocks
U+0000 - U+FFFF Basic Multilingual Plane BMP 55,503 163
U+10000 - U+1FFFF Supplementary Multilingual Plane SMP 22,279 134
U+20000 - U+2FFFF Supplementary Ideographic Plane SIP 60,866 6
U+30000 - U+3FFFF unassigned - 4,939 1
U+40000 - U+4FFFF unassigned - 0 0
U+50000 - U+5FFFF unassigned - 0 0
U+60000 - U+6FFFF unassigned - 0 0
U+70000 - U+7FFFF unassigned - 0 0
U+80000 - U+8FFFF unassigned - 0 0
U+90000 - U+9FFFF unassigned - 0 0
U+A0000 - U+AFFFF unassigned - 0 0
U+B0000 - U+BFFFF unassigned - 0 0
U+C0000 - U+CFFFF unassigned - 0 0
U+D0000 - U+DFFFF unassigned - 0 0
U+E0000 - U+EFFFF Supplementary Special-purpose Plane SSP 337 2
U+F0000 - U+FFFFF Supplementary Private Use Area planes PUA 0 1
U+100000 - U+10FFFF Supplementary Private Use Area planes PUA 0 1
P.41
https://www.compart.com/en/unicode/plane
工具四
P.42
工具四
P.43
工具五
P.44
參考文獻
P.45
(b) 字元編碼
UTF-8
UTF-16 BE
UTF-16 LE
P.46
章節 05
UTF-8
P.47
HexEd.it https://hexed.it/
P.48
安裝 Visual Studio Code
P.49
記事本
P.50
P.51
6 bytes
3 bytes
6 bytes
4 bytes
UTF-8
P.52
3 bytes
UTF-8
P.53
6 bytes
UTF-8
P.54
UTF-8
P.55
(c) 漢字中的四疊字
P.56
章節 05
漢字中的四疊字
P.57
UTF-8
P.58
UTF-8
P.59
UTF-8
P.60
UTF-16 and Surrogates
P.61
漢字中的四疊字
0001 1010 0110 1010 0101
P.62
UTF-8
P.63
UTF-8
P.64
(d) 非Unicode環境
P.65
章節 05
(d) Unicode環境
P.66
(d) Unicode環境
P.67
(d) 非Unicode環境
P.68
(d) 非Unicode環境
P.69
(d) 非Unicode環境
P.70
設定 cmd 的編碼方式
P.71
移動到此處,按下滑鼠右鍵
設定 cmd 的編碼方式
P.72
設定 cmd 的編碼方式
P.73
設定 cmd 的編碼方式
P.74
Visual Studio Code 終端機
P.75
Visual Studio Code 終端機
#include <stdio.h>
int main(){
printf("中文\n\n");
// https://stackoverflow.com/questions/29776849/why-cant-i-print-a-unicode-character-in-c-with-wchar-t
wchar_t a = 0x0041; /* A */
printf("%lc\n\n", a);
// https://www.ithome.com.tw/voice/135711
char text[] = u8"林𪚥𨰻";
printf("%s\n\n", text);
return 0;
}
P.76
Visual Studio Code 終端機
P.77
1. 拖拉進來,
按 Enter 執行
2. 拖拉進來,
按 Enter 執行
chcp 65001
Visual Studio Code 終端機
P.78
Visual Studio Code 終端機
P.79
Visual Studio Code 終端機
P.80
Visual Studio Code 終端機
P.81
Visual Studio Code 終端機
P.82
Visual Studio Code 終端機
P.83
參考文獻
P.84
(e) Ligature 「合字」「連字」
Enable Font Ligatures in VS Code
P.85
章節 05
Enable Font Ligatures in VS Code
P.86
Enable Font Ligatures in VS Code
P.87
Enable Font Ligatures in VS Code
P.88
Enable Font Ligatures in VS Code
P.89
Font | Reference |
Cascadia Code | |
Fira Code | |
JetBrains Mono | |
Iosevka | |
Hasklig | |
Monoid | |
Victor Mono |
Enable Font Ligatures in VS Code
P.90
Enable Font Ligatures in VS Code
P.91
Enable Font Ligatures in VS Code
P.92
Enable Font Ligatures in VS Code
{
"editor.fontFamily": "*** Your ligature enabled font ***",
"editor.fontLigatures": true,
}
P.93
‘Fira Code’
P.94
P.95
P.96
P.97
P.98
Enable Font Ligatures in VS Code
重新開啟 VS Code
P.99
Enable Font Ligatures in VS Code
重新開啟 VS Code
P.100
HW01 評分標準
P.101
04
章節 04
評分標準
P.102
繳交資訊
P.103
章節 05
繳交資訊
P.104
P.105
HW01 自我評分表
P.106
Regulations
P.107
助教聯絡資訊
P.108