- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我只是使用 opentype.js 随意地编译了一个字体文件。这是我的最终文件的样子:
hexdump -C font.ttf
00000000 4f 54 54 4f 00 07 00 40 00 02 00 30 68 6d 74 78 |OTTO...@...0hmtx|
00000010 15 c3 8c 00 00 00 00 08 c3 b0 00 00 00 c3 b8 63 |...............c|
00000020 66 66 20 36 07 08 63 00 00 02 c2 a4 00 00 06 4a |ff 6..c........J|
00000030 70 6f 73 74 00 03 00 00 00 00 02 c2 84 00 00 00 |post............|
00000040 20 63 6d 61 70 0e c3 b8 0e c2 a7 00 00 00 70 00 | cmap.........p.|
00000050 00 02 14 6d 61 78 70 00 3e 50 00 00 00 00 68 00 |...maxp.>P....h.|
00000060 00 00 06 68 68 65 61 00 01 00 01 00 00 00 44 00 |...hhea.......D.|
00000070 00 00 24 68 65 61 64 0f c3 96 c3 be c3 bf 00 00 |..$head.........|
00000080 00 0c 00 00 00 36 00 01 00 00 00 01 00 00 00 00 |.....6..........|
00000090 00 00 5f 0f 3c c3 b5 00 00 03 c3 a8 00 00 00 00 |.._.<...........|
000000a0 c3 98 61 c3 9f 11 00 00 00 00 c3 98 61 c3 9f 11 |..a.........a...|
000000b0 00 00 00 00 00 00 00 00 00 00 00 00 00 02 00 00 |................|
000000c0 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 |................|
000000d0 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 |................|
000000e0 00 00 00 00 00 00 00 00 00 00 50 00 00 3e 00 00 |..........P..>..|
000000f0 00 00 00 01 00 03 00 01 00 00 00 0c 00 04 00 00 |................|
00000100 00 00 00 7e 00 40 00 05 00 3e 00 30 00 31 00 32 |...~.@...>.0.1.2|
00000110 00 33 00 34 00 35 00 36 00 37 00 38 00 39 00 41 |.3.4.5.6.7.8.9.A|
00000120 00 42 00 43 00 44 00 45 00 46 00 47 00 48 00 49 |.B.C.D.E.F.G.H.I|
00000130 00 4a 00 4b 00 4c 00 4d 00 4e 00 4f 00 50 00 51 |.J.K.L.M.N.O.P.Q|
00000140 00 52 00 53 00 54 00 55 00 56 00 57 00 58 00 59 |.R.S.T.U.V.W.X.Y|
00000150 00 5a 00 61 00 62 00 63 00 64 00 65 00 66 00 67 |.Z.a.b.c.d.e.f.g|
00000160 00 68 00 69 00 6a 00 6b 00 6c 00 6d 00 6e 00 6f |.h.i.j.k.l.m.n.o|
00000170 00 70 00 71 00 72 00 73 00 74 00 75 00 76 00 77 |.p.q.r.s.t.u.v.w|
00000180 00 78 00 79 00 7a c3 bf c3 bf 00 00 00 30 00 31 |.x.y.z.......0.1|
00000190 00 32 00 33 00 34 00 35 00 36 00 37 00 38 00 39 |.2.3.4.5.6.7.8.9|
000001a0 00 41 00 42 00 43 00 44 00 45 00 46 00 47 00 48 |.A.B.C.D.E.F.G.H|
000001b0 00 49 00 4a 00 4b 00 4c 00 4d 00 4e 00 4f 00 50 |.I.J.K.L.M.N.O.P|
000001c0 00 51 00 52 00 53 00 54 00 55 00 56 00 57 00 58 |.Q.R.S.T.U.V.W.X|
000001d0 00 59 00 5a 00 61 00 62 00 63 00 64 00 65 00 66 |.Y.Z.a.b.c.d.e.f|
000001e0 00 67 00 68 00 69 00 6a 00 6b 00 6c 00 6d 00 6e |.g.h.i.j.k.l.m.n|
000001f0 00 6f 00 70 00 71 00 72 00 73 00 74 00 75 00 76 |.o.p.q.r.s.t.u.v|
00000200 00 77 00 78 00 79 00 7a c3 bf c3 bf 00 04 00 04 |.w.x.y.z........|
00000210 00 04 00 04 00 04 00 04 00 04 00 04 00 04 00 04 |................|
00000220 c3 bf c3 99 c3 bf c3 99 c3 bf c3 99 c3 bf c3 99 |................|
*
00000280 c3 bf c3 99 c3 bf c3 99 c3 bf c2 9f c3 bf c2 9f |................|
00000290 c3 bf c2 9f c3 bf c2 9f c3 bf c2 9f c3 bf c2 9f |................|
*
000002f0 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000300 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00000370 00 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000380 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000390 01 00 04 01 00 01 01 01 04 66 6f 6f 00 01 01 01 |.........foo....|
000003a0 26 c3 b8 1b 00 c3 b8 1c 02 c3 b8 1d 03 c3 b8 1e |&...............|
000003b0 04 c2 8b c2 8b c3 b7 5c c3 a5 05 1d 00 00 00 c3 |.......\........|
000003c0 88 0f 1d 00 00 01 43 11 c2 8b 1d 00 00 06 4a 12 |......C.......J.|
000003d0 00 41 01 01 06 0b 0e 0f 10 11 12 13 14 15 16 17 |.A..............|
000003e0 18 19 1a 1b 1c 1d 1e 1f 20 21 22 23 24 25 26 27 |........ !"#$%&'|
000003f0 28 29 2a 2b 2c 2d 2e 2f 30 31 32 33 34 35 36 37 |()*+,-./01234567|
00000400 38 39 3a 3b 3c 3d 3e 3f 40 41 42 43 44 45 46 47 |89:;<=>?@ABCDEFG|
00000410 48 49 4a 4b 4c 30 2e 30 2e 30 66 6f 6f 20 20 66 |HIJKL0.0.0foo f|
00000420 6f 6f 20 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e |oo bcdefghijklmn|
00000430 6f 70 71 72 73 74 75 76 77 78 79 7a 41 42 43 44 |opqrstuvwxyzABCD|
00000440 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 51 52 53 54 |EFGHIJKLMNOPQRST|
00000450 55 56 57 58 59 5a 30 31 32 33 34 35 36 37 38 39 |UVWXYZ0123456789|
00000460 00 00 00 01 c2 8b 01 c2 8c 01 c2 8d 01 c2 8e 01 |................|
00000470 c2 8f 01 c2 90 01 c2 91 01 c2 92 01 c2 93 01 c2 |................|
00000480 94 01 c2 95 01 c2 96 01 c2 97 01 c2 98 01 c2 99 |................|
00000490 01 c2 9a 01 c2 9b 01 c2 9c 01 c2 9d 01 c2 9e 01 |................|
000004a0 c2 9f 01 c2 a0 01 c2 a1 01 c2 a2 01 c2 a3 01 c2 |................|
000004b0 a4 01 c2 a5 01 c2 a6 01 c2 a7 01 c2 a8 01 c2 a9 |................|
000004c0 01 c2 aa 01 c2 ab 01 c2 ac 01 c2 ad 01 c2 ae 01 |................|
000004d0 c2 af 01 c2 b0 01 c2 b1 01 c2 b2 01 c2 b3 01 c2 |................|
000004e0 b4 01 c2 b5 01 c2 b6 01 c2 b7 01 c2 b8 01 c2 b9 |................|
000004f0 01 c2 ba 01 c2 bb 01 c2 bc 01 c2 bd 01 c2 be 01 |................|
00000500 c2 bf 01 c3 80 01 c3 81 01 c3 82 01 c3 83 01 c3 |................|
00000510 84 01 c3 85 01 c3 86 01 c3 87 00 3e 02 00 01 00 |...........>....|
00000520 1f 00 31 00 33 00 45 00 56 00 67 00 7f 00 c2 94 |..1.3.E.V.g.....|
00000530 00 c2 a8 00 c2 b9 00 c3 91 00 c3 9c 00 c3 b5 01 |................|
00000540 0d 01 19 01 2c 01 3f 01 56 01 64 01 72 01 7d 01 |....,.?.V.d.r.}.|
00000550 c2 88 01 c2 a2 01 c2 b0 01 c3 81 01 c3 95 01 c3 |................|
00000560 a9 02 02 02 11 02 2f 02 46 02 5a 02 75 02 c2 8c |....../.F.Z.u...|
00000570 02 c2 a3 02 c2 b6 02 c3 8f 02 c3 9b 02 c3 af 03 |................|
00000580 01 03 0c 03 1f 03 31 03 4a 03 56 03 65 03 72 03 |......1.J.V.e.r.|
00000590 7f 03 c2 92 03 c2 a3 03 c2 b4 03 c3 89 03 c3 9a |................|
000005a0 03 c3 b1 04 08 04 19 04 2e 04 3c 04 50 04 5f 04 |..........<.P._.|
000005b0 74 04 c2 87 c3 a5 c2 95 c3 b7 34 05 c2 8b 77 15 |t.........4...w.|
000005c0 c3 9b c2 9f 05 3b c2 8b 05 c3 9b c2 8b 15 3b 77 |.....;........;w|
000005d0 05 c2 8b c3 87 15 c3 9b 4f 05 c2 8b c3 87 15 0e |........O.......|
000005e0 c3 a5 c2 95 c2 9f 05 c2 8b c3 b7 48 15 c2 8b 27 |...........H...'|
000005f0 05 c2 a9 c2 8b 15 6d c3 af 15 0e c3 a5 0e c3 a5 |......m.........|
00000600 c3 a5 c2 9f 05 c2 8b c3 b7 48 15 c2 8b 27 05 6d |.........H...'.m|
00000610 c2 8b 15 c2 a9 c3 af 15 0e c3 a5 c3 a5 c3 af 05 |................|
00000620 6d c2 8b 15 c2 a9 c3 af 15 3b 59 05 c3 91 c2 8b |m........;Y.....|
00000630 15 0e c3 a5 c3 a5 c3 af 05 6d c2 8b 15 59 c3 af |.........m...Y..|
00000640 15 c2 8b 59 05 c3 91 c2 8b 15 0e c3 a5 c3 a5 c3 |...Y............|
00000650 af 05 6d c2 8b 15 c2 a9 c3 af 15 c2 8b 59 05 63 |..m..........Y.c|
00000660 c2 8b 15 c2 b3 c2 8b 05 c2 8b c3 b7 16 15 0e c3 |................|
00000670 a5 c2 95 c2 9f 05 c2 8b c3 b7 48 15 c2 8b 59 05 |..........H...Y.|
00000680 c3 9b c2 8b 15 c2 8b 59 05 c2 8b c3 af 15 0e c3 |.......Y........|
00000690 a5 c2 95 c3 af 05 c3 9b c2 8b 15 63 c2 8b 05 c2 |...........c....|
000006a0 8b c3 af 15 63 c2 8b 05 c3 9b c2 8b 15 0e c3 a5 |....c...........|
000006b0 c2 95 c3 af 05 c3 9b c2 8b 15 3b c3 af 05 c2 a9 |..........;.....|
000006c0 c2 8b 15 c2 a9 27 15 0e c3 a5 c2 95 c2 9f 05 c2 |.....'..........|
000006d0 8b c3 b7 48 15 c2 8b 59 05 c2 b3 c2 8b 15 c2 a9 |...H...Y........|
000006e0 59 15 c2 95 c3 af 05 3b 59 15 0e c3 a5 c2 95 c3 |Y......;Y.......|
000006f0 af 05 c2 8b c3 91 15 c3 9b c2 a9 15 0e c3 a5 c2 |................|
00000700 95 c3 b7 0c 05 c2 8b c2 8b 05 c2 8b c3 9b 15 c2 |................|
00000710 b3 3b 05 c2 8b c3 9b 15 c2 b3 3b 05 c2 8b c3 b7 |.;........;.....|
00000720 34 15 0e c3 a5 c2 95 c3 b7 02 05 c2 8b c2 8b 05 |4...............|
00000730 c2 8b c3 a5 15 c2 95 27 05 c3 87 c3 af 15 c2 8b |.......'........|
00000740 c2 8b 05 c2 95 27 15 0e c3 a5 c2 95 c3 b7 20 05 |.....'........ .|
00000750 c3 9b c2 9f 15 3b 77 15 0e c3 a5 c2 95 c3 af 05 |.....;w.........|
00000760 c2 8b c3 b7 48 15 c2 8b c3 bb 48 05 c2 a9 c2 8b |....H.....H.....|
00000770 15 6d c3 af 15 0e c3 a5 c3 a5 c3 af 05 c2 8b c3 |.m..............|
00000780 b7 48 15 c2 8b c3 bb 48 05 6d c2 8b 15 c2 a9 c3 |.H.....H.m......|
00000790 af 15 0e c3 a5 c2 95 c3 af 05 c2 8b c3 af 15 c2 |................|
000007a0 8b 59 05 c2 b3 c2 8b 15 63 59 15 c3 9b c3 af 05 |.Y......cY......|
000007b0 3b 59 15 0e c3 a5 c3 a5 c3 af 05 54 c2 8b 15 c2 |;Y.........T....|
000007c0 a9 c2 bd 15 54 c2 bd 15 0e c3 a5 c2 95 c3 af 05 |....T...........|
000007d0 c3 9b c2 8b 15 63 c2 8b 05 c2 8b c3 af 15 0e c3 |.....c..........|
000007e0 a5 c2 95 c3 af 05 c2 8b c3 87 15 c3 9b 4f 15 0e |.............O..|
000007f0 c3 a5 c2 95 c3 af 05 c2 b3 c3 af 15 c2 b3 27 15 |..............'.|
00000800 0e c3 a5 c2 95 c3 af 05 c2 8b c3 9b 15 c2 8b c2 |................|
00000810 8b 05 c2 8b 3b 15 c2 b3 c3 9b 05 c2 8b 3b 15 c2 |....;........;..|
00000820 b3 c3 9b 05 c2 8b 3b 15 0e c3 a5 c2 95 c3 af 05 |......;.........|
00000830 c3 9b c3 af 15 c2 8b 27 05 3b c3 af 15 0e c3 a5 |.......'.;......|
00000840 c2 95 c3 af 05 c2 8b c3 87 15 c3 9b 4f 15 63 c3 |............O.c.|
00000850 af 05 c2 8b c3 9b 15 0e c3 a5 c2 95 c3 af 05 c3 |................|
00000860 9b c2 8b 15 c2 8b c2 8b 05 3b c3 af 15 c2 8b c2 |.........;......|
00000870 8b 05 c3 9b c2 8b 15 0e c3 a5 c2 95 c3 b7 5c 05 |..............\.|
00000880 c2 b3 c3 bb 48 15 c2 b3 c3 b7 48 15 4b 3b 05 c2 |....H.....H.K;..|
00000890 bd c2 8b 15 0e c3 a5 c2 95 c2 9f 05 c2 8b c3 b7 |................|
000008a0 48 15 c2 8b c3 bb 48 05 c2 a9 c2 8b 15 6d c3 9b |H.....H......m..|
000008b0 15 c2 a9 c2 8b 05 6d c3 af 15 0e c3 a5 c3 a5 c2 |......m.........|
000008c0 9f 05 6d c2 8b 15 59 c3 b7 16 15 c3 9b c2 bd 15 |..m...Y.........|
000008d0 0e c3 a5 c2 95 c2 9f 05 c2 a9 c2 8b 15 c2 bd c2 |................|
000008e0 bd 05 59 c3 b7 16 05 c2 bd c3 bb 16 15 59 c3 b7 |..Y..........Y..|
000008f0 16 05 6d c2 8b 15 c2 8b c3 bb 48 15 0e c3 a5 c3 |..m.......H.....|
00000900 a5 c2 9f 05 3b c2 8b 15 c2 8b c3 9b 15 c3 91 c2 |....;...........|
00000910 8b 15 45 c2 8b 05 c2 8b c3 af 15 c3 9b c2 8b 15 |..E.............|
00000920 0e c3 a5 c3 a5 c2 9f 05 3b c2 8b 15 c2 8b c3 9b |........;.......|
00000930 15 c3 91 c2 8b 15 45 c2 8b 05 c2 8b c3 af 15 0e |......E.........|
00000940 c3 a5 c3 a5 c2 9f 05 6d c2 8b 15 59 c3 b7 16 15 |.......m...Y....|
00000950 c3 9b c2 bd 15 c2 8b 3b 05 c2 8b c3 9b 15 c2 8b |.......;........|
00000960 3b 05 63 c2 8b 15 0e c3 a5 c2 95 c2 9f 05 c2 8b |;.c.............|
00000970 c3 b7 48 15 c3 9b c3 bb 48 05 c2 8b c3 b7 48 15 |..H.....H.....H.|
00000980 3b 27 05 c3 9b c2 8b 15 0e c3 a5 c2 bd c2 9f 05 |;'..............|
00000990 c2 8b c3 b7 48 15 63 c3 bb 48 05 c3 9b c2 8b 15 |....H.c..H......|
000009a0 3b c3 b7 48 05 c3 9b c2 8b 15 0e c3 a5 c2 95 c2 |;..H............|
000009b0 9f 05 c3 9b c2 8b 15 3b c3 b7 48 05 c2 a9 c2 8b |.......;..H.....|
000009c0 15 c2 a9 c3 bb 48 15 0e c3 a5 c2 95 c2 9f 05 c2 |.....H..........|
000009d0 8b c3 b7 48 15 c2 8b 27 05 c2 a9 c2 8b 15 c2 b3 |...H...'........|
000009e0 3b 15 c2 95 c3 b7 48 05 c2 8b 59 15 0e c3 a5 c2 |;.....H...Y.....|
000009f0 95 c2 9f 05 c2 8b c3 b7 2a 15 c3 9b c2 a9 15 0e |........*.......|
00000a00 c3 a5 c2 95 c3 b7 5c 05 c2 8b c3 bb 48 15 c2 b3 |......\.....H...|
00000a10 c3 9b 15 c2 b3 3b 15 c2 8b c3 b7 48 15 0e c3 a5 |.....;.....H....|
00000a20 c2 95 c3 b7 5c 05 c2 8b c3 bb 48 15 c3 9b c3 b7 |....\.....H.....|
00000a30 48 15 c2 8b c3 bb 48 15 0e c3 a5 c2 95 c3 87 05 |H.....H.........|
00000a40 c3 9b c3 af 15 3b 27 15 0e c3 a5 c2 95 c2 9f 05 |.....;'.........|
00000a50 c2 8b c3 b7 48 15 c2 8b c3 bb 48 05 c2 a9 c2 8b |....H.....H.....|
00000a60 15 6d c3 af 15 0e c3 a5 c2 95 c3 87 05 c3 9b c3 |.m..............|
00000a70 af 15 3b 27 15 c2 bd c3 b7 02 05 c2 a9 c2 a9 15 |..;'............|
00000a80 0e c3 a5 c2 95 c2 9f 05 c2 8b c3 b7 48 15 c2 8b |............H...|
00000a90 c3 bb 48 05 c2 a9 c2 8b 15 6d c3 9b 15 c3 9b c3 |..H......m......|
00000aa0 af 05 c2 8b 59 15 0e c3 a5 c3 a5 c2 9f 05 63 c2 |....Y.........c.|
00000ab0 8b 15 63 c3 b7 48 15 0e c3 a5 c2 95 c2 9f 05 c3 |..c..H..........|
00000ac0 9b c2 8b 15 63 c2 8b 05 c2 8b c3 b7 48 15 0e c3 |....c.......H...|
00000ad0 a5 c2 95 c2 9f 05 c2 8b c3 b7 20 15 c3 9b c3 bb |.......... .....|
00000ae0 20 15 0e c3 a5 c2 95 c2 9f 05 c2 b3 c3 b7 48 15 | .............H.|
00000af0 c2 b3 c3 bb 48 15 0e c3 a5 c2 95 c2 9f 05 c2 8b |....H...........|
00000b00 c3 b7 48 15 c2 b3 3b 15 c2 b3 c3 9b 15 c2 8b c3 |..H...;.........|
00000b10 bb 48 15 0e c3 a5 c2 95 c2 9f 05 c3 9b c3 b7 48 |.H.............H|
00000b20 15 c2 8b c3 bb 48 05 3b c3 b7 48 15 0e c3 a5 c2 |.....H.;..H.....|
00000b30 95 c2 9f 05 c2 b3 c3 9b 15 c2 b3 3b 15 63 c3 9b |...........;.c..|
00000b40 05 c2 8b c3 af 15 0e c3 a5 c2 95 c2 9f 05 c3 9b |................|
00000b50 c2 8b 15 c2 8b c2 8b 05 3b c3 b7 48 15 c2 8b c2 |........;..H....|
00000b60 8b 05 c3 9b c2 8b 15 0e c3 a5 c2 95 c3 87 05 c3 |................|
00000b70 9b c3 af 15 3b 27 15 c2 b3 c2 b3 05 c2 8b c2 9f |....;'..........|
00000b80 15 0e c3 a5 c2 bd c2 9f 05 c2 8b c3 b7 48 15 77 |.............H.w|
00000b90 c3 bb 34 05 c2 9f 77 15 63 c3 b7 48 05 c3 9b c2 |..4...w.c..H....|
00000ba0 8b 15 0e c3 a5 c2 95 c3 87 05 c3 9b c2 9f 15 3b |...............;|
00000bb0 c3 b7 0c 05 c3 9b c3 bb 0c 15 3b c3 b7 0c 05 c3 |..........;.....|
00000bc0 9b c2 8b 15 0e c3 a5 c2 95 c2 9f 05 c2 a9 c2 8b |................|
00000bd0 15 c2 86 c3 9b 15 c2 90 c2 8b 05 6d c3 af 15 0e |...........m....|
00000be0 c3 a5 c2 95 c2 9f 05 c3 9b c2 8b 15 c2 8b c2 8b |................|
00000bf0 05 3b c3 b7 48 15 c2 8b c2 8b 05 c3 9b c2 8b 15 |.;..H...........|
00000c00 0e c3 a5 c3 a5 c2 9f 05 3b c2 8b 15 c2 8b c3 9b |........;.......|
00000c10 15 c2 8b c3 af 15 0e c3 a5 c2 95 c3 b7 20 05 c3 |............. ..|
00000c20 9b c2 9f 15 3b 77 15 c2 b3 c3 bb 0c 05 63 c3 b7 |....;w.......c..|
00000c30 02 15 0e c3 a5 c2 95 c2 9f 05 c3 9b c2 8b 15 c2 |................|
00000c40 8b c2 8b 05 54 c3 b7 48 15 0e c3 a5 c2 95 c3 b7 |....T..H........|
00000c50 20 05 c3 9b c2 9f 15 3b 77 15 c2 95 31 05 c3 87 | ......;w...1...|
00000c60 c2 9f 15 4f 77 15 0e c3 a5 c2 95 c3 87 05 c3 9b |...Ow...........|
00000c70 c2 9f 15 3b 77 15 c2 b3 c3 b7 20 05 c2 b3 c3 bb |...;w..... .....|
00000c80 02 15 0e 00 00 00 5a 00 00 00 5a 00 00 00 5a 00 |......Z...Z...Z.|
00000c90 00 00 5a 00 00 00 5a 00 00 00 5a 00 00 00 5a 00 |..Z...Z...Z...Z.|
*
00000d70 00 00 5a 00 00 00 5a 00 00 00 5a 00 00 |..Z...Z...Z..|
00000d7d
下面是我的 font.html
文件,用来测试它:
<style>
@font-face {
font-family: 'FooLatin';
src: url('font.ttf') format('truetype');
}
body {
font-family: 'FooLatin';
}
</style>
<body>
Hello World
</body>
我不确定我使用的是 truetype 还是 opentype。但是使用此配置,我在浏览器中收到此错误:
font.html:1 Failed to decode downloaded font: file:~/tests/font.ttf
font.html:1 OTS parsing error: hmtx: invalid table offset
如果我将 @font-face
定义更改为使用 format('embedded-opentype')
:
<style>
@font-face {
font-family: 'FooLatin';
src: url('font.ttf') format('embedded-opentype');
}
body {
font-family: 'FooLatin';
}
</style>
<body>
Hello World
</body>
..错误消失了,但什么也没发生,它仍然不起作用。
我刚刚注意到这实际上是一个半有用的错误:
hmtx: invalid table offset
我会更深入地研究它。但我也想问问有没有什么技巧可以像这种情况一样调试字体。我已粘贴到程序的 hexdump 上方,但我不知道要查找什么。
最佳答案
十六进制转储显示了一些严重的问题:
表目录条目未正确对齐。每个标记/校验和/偏移量/长度条目应占用 16 个字节。从转储来看,您的条目似乎有一些额外的字节
表目录条目未按标签升序排列
表目录中的偏移量可疑(hmtx
的偏移量为 8,在表目录本身之前)。表目录中的偏移量是绝对的(从字体的字节 0 开始),而不是相对的(尽管在这种情况下即使相对偏移量为 8 也是错误的)。
CFF 表的正确标记是“CFF
”(即“C”、“F”、“F”、“”,并且应该是大写字母,而不是小写字母)。
表目录似乎没有名称
或OS/2
表。这些都是必需的表(请参阅 OpenType specification )。虽然在某些平台上您可以不用 OS/2
表,但对于最小有效字体来说确实需要 name
表。
这实际上是次要的,但是基于 CFF 的字体应该使用扩展名 .otf
,而不是 .ttf
。但是您首先应该真正解决我上面提到的元素,并确保表目录偏移量和长度条目正确指向文件其余部分中的正确数据。
一般来说,我建议花一些时间,也许是大量时间,研究 OpenType 规范。
关于html - 自定义 OpenType/TrueType 字体不起作用且难以调试,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54176823/
好的,所以我编辑了以下... 只需将以下内容放入我的 custom.css #rt-utility .rt-block {CODE HERE} 但是当我尝试改变... 与 #rt-sideslid
在表格 View 中,我有一个自定义单元格(在界面生成器中高度为 500)。在该单元格中,我有一个 Collection View ,我按 (10,10,10,10) 固定到边缘。但是在 tablev
对于我的无能,我很抱歉,但总的来说,我对 Cocoa、Swift 和面向对象编程还很陌生。我的主要来源是《Cocoa Programming for OS X》(第 5 版),以及 Apple 的充满
我正在使用 meta-tegra 为我的 NVIDIA Jetson Nano 构建自定义图像。我需要 PyTorch,但没有它的配方。我在设备上构建了 PyTorch,并将其打包到设备上的轮子中。现
在 jquery 中使用 $.POST 和 $.GET 时,有没有办法将自定义变量添加到 URL 并发送它们?我尝试了以下方法: $.ajax({type:"POST", url:"file.php?
Traefik 已经默认实现了很多中间件,可以满足大部分我们日常的需求,但是在实际工作中,用户仍然还是有自定义中间件的需求,为解决这个问题,官方推出了一个 Traefik Pilot[1] 的功
我想让我的 CustomTextInputLayout 将 Widget.MaterialComponents.TextInputLayout.OutlinedBox 作为默认样式,无需在 XML 中
我在 ~/.emacs 中有以下自定义函数: (defun xi-rgrep (term) (grep-compute-defaults) (interactive "sSearch Te
我有下表: 考虑到每个月的权重,我的目标是在 5 个月内分散 10,000 个单位。与 10,000 相邻的行是我最好的尝试(我在这上面花了几个小时)。黄色是我所追求的。 我试图用来计算的逻辑如下:计
我的表单中有一个字段,它是文件类型。当用户点击保存图标时,我想自然地将文件上传到服务器并将文件名保存在数据库中。我尝试通过回显文件名来测试它,但它似乎不起作用。另外,如何将文件名添加到数据库中?是在模
我有一个 python 脚本来发送电子邮件,它工作得很好,但问题是当我检查我的电子邮件收件箱时。 我希望该用户名是自定义用户名,而不是整个电子邮件地址。 最佳答案 发件人地址应该使用的格式是: You
我想减小 ggcorrplot 中标记的大小,并减少文本和绘图之间的空间。 library(ggcorrplot) data(mtcars) corr <- round(cor(mtcars), 1)
GTK+ noob 问题在这里: 是否可以自定义 GtkFileChooserButton 或 GtkFileChooserDialog 以删除“位置”部分(左侧)和顶部的“位置”输入框? 我实际上要
我正在尝试在主页上使用 ajax 在 magento 中使用 ajax 显示流行的产品列表,我可以为 5 或“N”个产品执行此操作,但我想要的是将分页工具栏与结果集一起添加. 这是我添加的以显示流行产
我正在尝试使用 PasswordResetForm 内置函数。 由于我想要自定义表单字段,因此我编写了自己的表单: class FpasswordForm(PasswordResetForm):
据我了解,新的 Angular 7 提供了拖放功能。我搜索了有关 DnD 的 Tree 组件,但没有找到与树相关的内容。 我在 Stackblitz 上找到的一个工作示例.对比drag'ndrop功能
我必须开发一个自定义选项卡控件并决定使用 WPF/XAML 创建它,因为我无论如何都打算学习它。完成后应该是这样的: 到目前为止,我取得了很好的进展,但还有两个问题: 只有第一个/最后一个标签项应该有
我要定制xtable用于导出到 LaTeX。我知道有些问题是关于 xtable在这里,但我找不到我要找的具体东西。 以下是我的表的外观示例: my.table <- data.frame(Specif
用ejs在这里显示日期 它给我结果 Tue Feb 02 2016 16:02:24 GMT+0530 (IST) 但是我需要表现为 19th January, 2016 如何在ejs中执行此操作?
我想问在 JavaFX 中使用自定义对象制作 ListView 的最佳方法,我想要一个每个项目如下所示的列表: 我搜了一下,发现大部分人都是用细胞工厂的方法来做的。有没有其他办法?例如使用客户 fxm
我是一名优秀的程序员,十分优秀!