Files
docx/scripts/layout-probes/word-character-widths.json
Dolan 66743729ef feat(layout): measure Greek, Cyrillic, Vietnamese, Latin Extended, punctuation and symbols with Word's widths, and break lines after the spaces Word breaks after (#3628)
* test(layout): probe how wide Word draws the characters of the width tables, and how lines break after other spaces

* feat(layout): measure Latin Extended, Greek, Cyrillic, Vietnamese, punctuation and symbols with Word's widths, and break lines after the spaces Word breaks after

* chore(layout): spell the generator's tool names

* fix(layout): stop at a symbol whose character isn't four hexadecimal digits, rather than read part of it or throw

w:char is ST_ShortHexNumber, two bytes, but SymbolRun writes whatever string it is given. parseInt read "F0FCzz" as
F0FC, and a code past U+10FFFF, such as "110000", made String.fromCodePoint throw, which made Packer reject.

* docs(layout): give a mathematical symbol in Calibri as the example of a character whose width isn't known

Word's PDF showed its Cambria has Greek, so Greek in Cambria no longer stops the layout.
2026-10-02 02:01:00 +01:00

2 lines
11 KiB
JSON

{"size":10,"copies":10,"faces":[{"font":"Calibri","bold":false},{"font":"Calibri","bold":true},{"font":"Cambria","bold":false},{"font":"Cambria","bold":true},{"font":"Arial","bold":false},{"font":"Arial","bold":true},{"font":"Times New Roman","bold":false},{"font":"Times New Roman","bold":true},{"font":"Courier New","bold":false},{"font":"Courier New","bold":true}],"paragraphs":[[33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48],[49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64],[65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80],[81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96],[97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112],[113,114,115,116,117,118,119,120,121,122,123,124,125,126,161,162],[163,164,165,166,167,168,169,170,171,172,174,175,176,177,178,179],[180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211],[212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227],[228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243],[244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259],[260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275],[276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291],[292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307],[308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323],[324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339],[340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355],[356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371],[372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387],[388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403],[404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419],[420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435],[436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451],[452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,467],[468,469,470,471,472,473,474,475,476,477,478,479,480,481,482,483],[484,485,486,487,488,489,490,491,492,493,494,495,496,497,498,499],[500,501,502,503,504,505,506,507,508,509,510,511,512,513,514,515],[516,517,518,519,520,521,522,523,524,525,526,527,528,529,530,531],[532,533,534,535,536,537,538,539,540,541,542,543,544,545,546,547],[548,549,550,551,552,553,554,555,556,557,558,559,560,561,562,563],[564,565,566,567,568,569,570,571,572,573,574,575,576,577,578,579],[580,581,582,583,584,585,586,587,588,589,590,591,592,593,594,595],[596,597,598,599,600,601,602,603,604,605,606,607,608,609,610,611],[612,613,614,615,616,617,618,619,620,621,622,623,624,625,626,627],[628,629,630,631,632,633,634,635,636,637,638,639,640,641,642,643],[644,645,646,647,648,649,650,651,652,653,654,655,656,657,658,659],[660,661,662,663,664,665,666,667,668,669,670,671,672,673,674,675],[676,677,678,679,680,681,682,683,684,685,686,687,688,689,690,691],[692,693,694,695,696,697,698,699,700,701,702,703,704,705,706,707],[708,709,710,711,712,713,714,715,716,717,718,719,720,721,722,723],[724,725,726,727,728,729,730,731,732,733,734,735,736,737,738,739],[740,741,742,743,744,745,746,747,748,749,750,751,752,753,754,755],[756,757,758,759,760,761,762,763,764,765,766,767,880,881,882,883],[884,885,886,887,890,891,892,893,894,895,900,901,902,903,904,905],[906,908,910,911,912,913,914,915,916,917,918,919,920,921,922,923],[924,925,926,927,928,929,931,932,933,934,935,936,937,938,939,940],[941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956],[957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972],[973,974,975,976,977,978,979,980,981,982,983,984,985,986,987,988],[989,990,991,992,993,994,995,996,997,998,999,1000,1001,1002,1003,1004],[1005,1006,1007,1008,1009,1010,1011,1012,1013,1014,1015,1016,1017,1018,1019,1020],[1021,1022,1023,1024,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036],[1037,1038,1039,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052],[1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068],[1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084],[1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100],[1101,1102,1103,1104,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116],[1117,1118,1119,1120,1121,1122,1123,1124,1125,1126,1127,1128,1129,1130,1131,1132],[1133,1134,1135,1136,1137,1138,1139,1140,1141,1142,1143,1144,1145,1146,1147,1148],[1149,1150,1151,1152,1153,1154,1162,1163,1164,1165,1166,1167,1168,1169,1170,1171],[1172,1173,1174,1175,1176,1177,1178,1179,1180,1181,1182,1183,1184,1185,1186,1187],[1188,1189,1190,1191,1192,1193,1194,1195,1196,1197,1198,1199,1200,1201,1202,1203],[1204,1205,1206,1207,1208,1209,1210,1211,1212,1213,1214,1215,1216,1217,1218,1219],[1220,1221,1222,1223,1224,1225,1226,1227,1228,1229,1230,1231,1232,1233,1234,1235],[1236,1237,1238,1239,1240,1241,1242,1243,1244,1245,1246,1247,1248,1249,1250,1251],[1252,1253,1254,1255,1256,1257,1258,1259,1260,1261,1262,1263,1264,1265,1266,1267],[1268,1269,1270,1271,1272,1273,1274,1275,1276,1277,1278,1279,7680,7681,7682,7683],[7684,7685,7686,7687,7688,7689,7690,7691,7692,7693,7694,7695,7696,7697,7698,7699],[7700,7701,7702,7703,7704,7705,7706,7707,7708,7709,7710,7711,7712,7713,7714,7715],[7716,7717,7718,7719,7720,7721,7722,7723,7724,7725,7726,7727,7728,7729,7730,7731],[7732,7733,7734,7735,7736,7737,7738,7739,7740,7741,7742,7743,7744,7745,7746,7747],[7748,7749,7750,7751,7752,7753,7754,7755,7756,7757,7758,7759,7760,7761,7762,7763],[7764,7765,7766,7767,7768,7769,7770,7771,7772,7773,7774,7775,7776,7777,7778,7779],[7780,7781,7782,7783,7784,7785,7786,7787,7788,7789,7790,7791,7792,7793,7794,7795],[7796,7797,7798,7799,7800,7801,7802,7803,7804,7805,7806,7807,7808,7809,7810,7811],[7812,7813,7814,7815,7816,7817,7818,7819,7820,7821,7822,7823,7824,7825,7826,7827],[7828,7829,7830,7831,7832,7833,7834,7835,7836,7837,7838,7839,7840,7841,7842,7843],[7844,7845,7846,7847,7848,7849,7850,7851,7852,7853,7854,7855,7856,7857,7858,7859],[7860,7861,7862,7863,7864,7865,7866,7867,7868,7869,7870,7871,7872,7873,7874,7875],[7876,7877,7878,7879,7880,7881,7882,7883,7884,7885,7886,7887,7888,7889,7890,7891],[7892,7893,7894,7895,7896,7897,7898,7899,7900,7901,7902,7903,7904,7905,7906,7907],[7908,7909,7910,7911,7912,7913,7914,7915,7916,7917,7918,7919,7920,7921,7922,7923],[7924,7925,7926,7927,7928,7929,7930,7931,7932,7933,7934,7935,8208,8209,8210,8211],[8212,8213,8214,8215,8216,8217,8218,8219,8220,8221,8222,8223,8224,8225,8226,8227],[8228,8229,8230,8231,8240,8241,8242,8243,8244,8245,8246,8247,8248,8249,8250,8251],[8252,8253,8254,8255,8256,8257,8258,8259,8260,8261,8262,8263,8264,8265,8266,8267],[8268,8269,8270,8271,8272,8273,8274,8275,8276,8277,8278,8279,8280,8281,8282,8283],[8284,8285,8286,8304,8305,8308,8309,8310,8311,8312,8313,8314,8315,8316,8317,8318],[8319,8320,8321,8322,8323,8324,8325,8326,8327,8328,8329,8330,8331,8332,8333,8334],[8336,8337,8338,8339,8340,8341,8342,8343,8344,8345,8346,8347,8348,8352,8353,8354],[8355,8356,8357,8358,8359,8360,8361,8362,8363,8364,8365,8366,8367,8368,8369,8370],[8371,8372,8373,8374,8375,8376,8377,8378,8379,8380,8381,8382,8383,8384,8385,8448],[8449,8450,8451,8452,8453,8454,8455,8456,8457,8458,8459,8460,8461,8462,8463,8464],[8465,8466,8467,8468,8469,8470,8471,8472,8473,8474,8475,8476,8477,8478,8479,8480],[8481,8482,8483,8484,8485,8486,8487,8488,8489,8490,8491,8492,8493,8494,8495,8496],[8497,8498,8499,8500,8501,8502,8503,8504,8505,8506,8507,8508,8509,8510,8511,8512],[8513,8514,8515,8516,8517,8518,8519,8520,8521,8522,8523,8524,8525,8526,8527,8528],[8529,8530,8531,8532,8533,8534,8535,8536,8537,8538,8539,8540,8541,8542,8543,8544],[8545,8546,8547,8548,8549,8550,8551,8552,8553,8554,8555,8556,8557,8558,8559,8560],[8561,8562,8563,8564,8565,8566,8567,8568,8569,8570,8571,8572,8573,8574,8575,8576],[8577,8578,8579,8580,8581,8582,8583,8584,8585,8586,8587,8592,8593,8594,8595,8596],[8597,8598,8599,8600,8601,8602,8603,8604,8605,8606,8607,8608,8609,8610,8611,8612],[8613,8614,8615,8616,8617,8618,8619,8620,8621,8622,8623,8624,8625,8626,8627,8628],[8629,8630,8631,8632,8633,8634,8635,8636,8637,8638,8639,8640,8641,8642,8643,8644],[8645,8646,8647,8648,8649,8650,8651,8652,8653,8654,8655,8656,8657,8658,8659,8660],[8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671,8672,8673,8674,8675,8676],[8677,8678,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689,8690,8691,8692],[8693,8694,8695,8696,8697,8698,8699,8700,8701,8702,8703,8704,8705,8706,8707,8708],[8709,8710,8711,8712,8713,8714,8715,8716,8717,8718,8719,8720,8721,8722,8723,8724],[8725,8726,8727,8728,8729,8730,8731,8732,8733,8734,8735,8736,8737,8738,8739,8740],[8741,8742,8743,8744,8745,8746,8747,8748,8749,8750,8751,8752,8753,8754,8755,8756],[8757,8758,8759,8760,8761,8762,8763,8764,8765,8766,8767,8768,8769,8770,8771,8772],[8773,8774,8775,8776,8777,8778,8779,8780,8781,8782,8783,8784,8785,8786,8787,8788],[8789,8790,8791,8792,8793,8794,8795,8796,8797,8798,8799,8800,8801,8802,8803,8804],[8805,8806,8807,8808,8809,8810,8811,8812,8813,8814,8815,8816,8817,8818,8819,8820],[8821,8822,8823,8824,8825,8826,8827,8828,8829,8830,8831,8832,8833,8834,8835,8836],[8837,8838,8839,8840,8841,8842,8843,8844,8845,8846,8847,8848,8849,8850,8851,8852],[8853,8854,8855,8856,8857,8858,8859,8860,8861,8862,8863,8864,8865,8866,8867,8868],[8869,8870,8871,8872,8873,8874,8875,8876,8877,8878,8879,8880,8881,8882,8883,8884],[8885,8886,8887,8888,8889,8890,8891,8892,8893,8894,8895,8896,8897,8898,8899,8900],[8901,8902,8903,8904,8905,8906,8907,8908,8909,8910,8911,8912,8913,8914,8915,8916],[8917,8918,8919,8920,8921,8922,8923,8924,8925,8926,8927,8928,8929,8930,8931,8932],[8933,8934,8935,8936,8937,8938,8939,8940,8941,8942,8943,8944,8945,8946,8947,8948],[8949,8950,8951,8952,8953,8954,8955,8956,8957,8958,8959]],"spaces":[32,160,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,8203,8204,8205,8206,8207,8288],"breaks":{"codes":[8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288],"words":["the","in","foot","mouth","made","on","river","was","and","the","coast","boat","to","the","by","lighthouse","of","summer","the","survey","the","from","the","in","foot","mouth","made","on","river","was","and","the","coast","boat","to","the","by","lighthouse","of","summer"]},"hangs":[{"code":32,"word":"oirrrrttss","end":9001.14},{"code":8192,"word":"eiiirfsscc","end":8971},{"code":8193,"word":"iirsssscc","end":8916},{"code":8194,"word":"rtffffssss","end":8971.22},{"code":8195,"word":"oitffssss","end":8926.45},{"code":8196,"word":"ttffffsccc","end":8989.15},{"code":8197,"word":"ertsssscc","end":8998.5},{"code":8198,"word":"irtttssccc","end":9007.63},{"code":8199,"word":"ittttffccc","end":8966.71},{"code":8200,"word":"iirrtffffs","end":9002.13},{"code":8201,"word":"iiitfffsss","end":9004},{"code":8202,"word":"iirttttffs","end":9012.25},{"code":8239,"word":"rrrrtttfs","end":9001.14},{"code":8287,"word":"oirrttttf","end":9001.58},{"code":12288,"word":"eeeeoff","end":8916}]}