You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: css-inline/Overview.bs
+89-12Lines changed: 89 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -1090,28 +1090,105 @@ Interaction with floats</h4>
1090
1090
Issue: Is this the behavior we want? What if the float is on the same line as the initial letter?
1091
1091
1092
1092
<h2 class="no-num" id="baseline-synthesis">
1093
-
Appendix A: Synthesizing Baselines</h2>
1093
+
Appendix A: Synthesizing Alignment Metrics</h2>
1094
1094
1095
1095
<h3 class="no-num" id="baseline-synthesis-fonts">
1096
-
A.1: Synthesizing Baselines for Text</h3>
1096
+
A.1: Synthesizing Baselines (and Other Font Metrics) for Text</h3>
1097
1097
1098
-
Some fonts may not contain the baseline information necessary to align properly as described above.
1099
-
User agents may follow these steps in the absence of a required metric:
1098
+
Some fonts might not contain the metrics information necessary
1099
+
to align text properly as described in this module.
1100
+
User agents may use the following strategies
1101
+
in the absence of a required metric:
1100
1102
1101
-
<ol>
1102
-
1103
-
<li>Measure the font.
1104
-
<div class="issue">Describe in more detail.
1105
-
Should we document which characters in which scripts are useful,
1106
-
such as lowercase "o" to <a href="https://drafts.csswg.org/css-values/#ex">measure x-height</a> or the middle of the minus sign for the mathematical baseline?</div>
1103
+
<dl>
1107
1104
1108
-
<li>Use a heuristic for the script.
1105
+
<dt>Measure the font
1106
+
<dd>
1107
+
Metrics may be derived from the glyph shapes.
1108
+
For example,
1109
+
<ol>
1110
+
<li>
1111
+
The center of the minus sign (U+2212)
1112
+
can be taken as the mathematical baseline.
1113
+
1114
+
<li>
1115
+
The amount by which the lowercase “o”
1116
+
descends below the alphabetic baseline
1117
+
can be subtracted from its highest point
1118
+
to <a href="https://drafts.csswg.org/css-values/#ex">measure the x-height</a>.
1119
+
1120
+
<li>
1121
+
The amount by which the uppercase “O”
1122
+
descends below the alphabetic baseline
1123
+
can be subtracted from its highest point
1124
+
to measure the cap-height.
1125
+
1126
+
<li>
1127
+
The top edge of the below ideograph (U+4E05 “丅”)
1128
+
and the bottom edge of the above ideograph (U+4E04 “丄”)
1129
+
can be taken as the ideographic character face edges.
1130
+
In the horizontal dimension,
1131
+
the left and right edges of the nation ideograph (U+56FD “国”)
1132
+
or solid ideograph (U+56FA “固”)
1133
+
can be used.
1134
+
In all cases, the these edges should be measured
1135
+
at their intersection with the central baseline in that axis.
1136
+
1137
+
Issue: Is 国 or 固 more common?
1138
+
1139
+
<li>
1140
+
The top edge of the center of the Hebrew maqaf (U+05B3 “־”)
1141
+
can be taken as the Hebrew hanging baseline.
1142
+
1143
+
<li>
1144
+
The top edge of the center of the letter Ka
1145
+
can be taken as the hanging baseline.
1146
+
Which Ka is used should depend on the <a>content language</a>:
1147
+
1148
+
<table class="data">
1149
+
<thead>
1150
+
<tr>
1151
+
<th>Language
1152
+
<th>Script
1153
+
<th>Letter
1154
+
<tbody>
1155
+
<tr>
1156
+
<td>
1157
+
<td>Devanagari
1158
+
<td>क U+0915 KA
1159
+
<tr>
1160
+
<td>
1161
+
<td>Bengali
1162
+
<td>ক U+0995
1163
+
<tr>
1164
+
<td>
1165
+
<td>Gurmukhi
1166
+
<td>ਕ U+0A15
1167
+
<tr>
1168
+
<td>
1169
+
<td>Tibetan
1170
+
<td>ཀ U+0F40
1171
+
</table>
1172
+
1173
+
Issue: Pick a default.
1174
+
1175
+
<li>Issue: Add more notes here?
1176
+
</ol>
1177
+
1178
+
Issue: Somebody sanity-check these heuristics please.
0 commit comments