Commit c1e6d6b
committed
Allow underscores in guifont PostScript names
MacVim guifont's can be specified by either full PostScript names or
family names. Since family names can contain spaces, MacVim allows using
underscores to serve as substitute to make it easier for the user to
type, and this is similar to how Win32 gVim works.
However, some fonts use underscores in their full PostScript name. For
example, Cascadia Code has names like "CascadiaCode-Regular_Light". The
previous substitution code always replaced underscores with spaces which
was wrong. Fix it to only do the substitution if the font could not be
loaded. Also, fix documentation to be clearer in what MacVim expects as
guifont's input.
In retrospect, implicit substitution like this was probably a bad idea
when the user could just escape with spaces, but given this has been the
behavior for a long time we should just keep it to avoid breaking
backwards compatibility.
Fix #12081 parent 37bfc1f commit c1e6d6b
2 files changed
+21
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1135 | 1135 | | |
1136 | 1136 | | |
1137 | 1137 | | |
1138 | | - | |
1139 | | - | |
1140 | | - | |
| 1138 | + | |
| 1139 | + | |
| 1140 | + | |
| 1141 | + | |
| 1142 | + | |
| 1143 | + | |
| 1144 | + | |
| 1145 | + | |
1141 | 1146 | | |
| 1147 | + | |
| 1148 | + | |
| 1149 | + | |
1142 | 1150 | | |
1143 | 1151 | | |
1144 | 1152 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1196 | 1196 | | |
1197 | 1197 | | |
1198 | 1198 | | |
1199 | | - | |
1200 | | - | |
1201 | | - | |
1202 | | - | |
1203 | | - | |
1204 | | - | |
1205 | 1199 | | |
1206 | 1200 | | |
1207 | 1201 | | |
| |||
1228 | 1222 | | |
1229 | 1223 | | |
1230 | 1224 | | |
| 1225 | + | |
| 1226 | + | |
| 1227 | + | |
| 1228 | + | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
| 1232 | + | |
| 1233 | + | |
| 1234 | + | |
1231 | 1235 | | |
1232 | 1236 | | |
1233 | 1237 | | |
| |||
0 commit comments