diff options
| author | Eli Zaretskii | 2015-08-19 18:04:22 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2015-08-19 18:04:22 +0300 |
| commit | ae7cfd0baf24fda984ff4c0631bcaa477ea11b7f (patch) | |
| tree | 9a3dae67498d68e75afbc92b6c7e2586b8ead738 /src/w32fns.c | |
| parent | 7eed7399358faecd719febae4dc720ef2be41155 (diff) | |
| download | emacs-ae7cfd0baf24fda984ff4c0631bcaa477ea11b7f.tar.gz emacs-ae7cfd0baf24fda984ff4c0631bcaa477ea11b7f.zip | |
Improve and future-proof OTF fonts support in w32uniscribe.c
* src/w32uniscribe.c (uniscribe_otf_capability): Add commentary
about the expected results and why the new Uniscribe APIs are not
used in this function.
(ScriptGetFontScriptTags_Proc, ScriptGetFontLanguageTags_Proc)
(ScriptGetFontFeatureTags_Proc): New function typedefs.
(uniscribe_new_apis): New static variable.
(uniscribe_check_features): New function, implements OTF features
verification while correctly accounting for features in the list
after the nil member, if any.
(uniscribe_check_otf_1): New function, retrieves the features
supported by the font for the requested script and language using
the Uniscribe APIs available from Windows Vista onwards.
(uniscribe_check_otf): If the new Uniscribe APIs are available,
use them in preference to reading the font data directly. Call
uniscribe_check_features to verify that the requested features are
supported, replacing the original incomplete code.
(syms_of_w32uniscribe): Initialize function pointers for the new
Uniscribe APIs. (Bug#21260)
(otf_features): Scan the script, langsys, and feature arrays back
to front, so that the result we return has them in alphabetical
order, like ftfont.c does.
* src/w32fns.c (syms_of_w32fns) <w32-disable-new-uniscribe-apis>:
New variable for debugging w32uniscribe.c code.
Diffstat (limited to 'src/w32fns.c')
| -rw-r--r-- | src/w32fns.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/w32fns.c b/src/w32fns.c index 189a27c62f1..e91097ba20e 100644 --- a/src/w32fns.c +++ b/src/w32fns.c | |||
| @@ -9242,6 +9242,16 @@ Default is nil. | |||
| 9242 | This variable has effect only on NT family of systems, not on Windows 9X. */); | 9242 | This variable has effect only on NT family of systems, not on Windows 9X. */); |
| 9243 | w32_use_fallback_wm_chars_method = 0; | 9243 | w32_use_fallback_wm_chars_method = 0; |
| 9244 | 9244 | ||
| 9245 | DEFVAR_BOOL ("w32-disable-new-uniscribe-apis", | ||
| 9246 | w32_disable_new_uniscribe_apis, | ||
| 9247 | doc: /* Non-nil means don't use new Uniscribe APIs. | ||
| 9248 | The new APIs are used to access OTF features supported by fonts. | ||
| 9249 | This is intended only for debugging of the new Uniscribe-related code. | ||
| 9250 | Default is nil. | ||
| 9251 | |||
| 9252 | This variable has effect only on Windows Vista and later. */); | ||
| 9253 | w32_disable_new_uniscribe_apis = 0; | ||
| 9254 | |||
| 9245 | #if 0 /* TODO: Port to W32 */ | 9255 | #if 0 /* TODO: Port to W32 */ |
| 9246 | defsubr (&Sx_change_window_property); | 9256 | defsubr (&Sx_change_window_property); |
| 9247 | defsubr (&Sx_delete_window_property); | 9257 | defsubr (&Sx_delete_window_property); |