Qian Hong <fracting(a)gmail.com> writes:
> @@ -813,6 +926,12 @@ static HRESULT init_script_cache(const HDC hdc, SCRIPT_CACHE *psc)
> return E_INVALIDARG;
> }
> sc->sfnt = (GetFontData(hdc, MS_MAKE_TAG('h','e','a','d'), 0, NULL, 0)!=GDI_ERROR);
> +
> + set_cache_blank_char(hdc, sc);
> + set_cache_default_char(hdc, sc);
> + set_cache_invalid_char(hdc, sc);
> + set_cache_kashida_char(hdc, sc);
> +
> *psc = sc;
> TRACE("<- %p\n", sc);
> return S_OK;
> @@ -1063,12 +1182,11 @@ HRESULT WINAPI ScriptGetFontProperties(HDC hdc, SCRIPT_CACHE *psc, SCRIPT_FONTPR
> if (sfp->cBytes != sizeof(SCRIPT_FONTPROPERTIES))
> return E_INVALIDARG;
>
> - /* return something sensible? */
> - sfp->wgBlank = 0;
> + sfp->wgBlank = get_cache_blank_char(psc);
> sfp->wgDefault = get_cache_default_char(psc);
> - sfp->wgInvalid = 0;
> - sfp->wgKashida = 0xffff;
> - sfp->iKashidaWidth = 0;
> + sfp->wgInvalid = get_cache_invalid_char(psc);
> + sfp->wgKashida = get_cache_kashida_char(psc);
> + sfp->iKashidaWidth = 0; /* TODO */
It doesn't seem useful to have all these separate set and get functions,
particularly since their implementation is very similar.
--
Alexandre Julliard
julliard(a)winehq.org