]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/windows/uniscribe/uniscribe.factor
change add-init-hook to add-startup-hook, new add-shutdown-hook word
[factor.git] / basis / windows / uniscribe / uniscribe.factor
index 7dd630ca5b1ad5f3d27c50f8991657c56b16f033..1651e8b3d894e96b45d41c483cc39067e8b68982 100755 (executable)
@@ -82,7 +82,8 @@ TUPLE: script-string < disposable font string metrics ssa size image ;
 : script-string-size ( script-string -- dim )
     ssa>> ScriptString_pSize
     dup win32-error=0/f
-    [ SIZE-cx ] [ SIZE-cy ] bi 2array ;
+    SIZE memory>struct
+    [ cx>> ] [ cy>> ] bi 2array ;
 
 : dc-metrics ( dc -- metrics )
     TEXTMETRICW <struct>
@@ -113,4 +114,7 @@ SYMBOL: cached-script-strings
     cached-script-strings get-global [ <script-string> ] 2cache ;
 
 [ <cache-assoc> cached-script-strings set-global ]
-"windows.uniscribe" add-init-hook
+"windows.uniscribe" add-startup-hook
+
+[ cached-script-strings get-global dispose ]
+"windows.uniscribe" add-shutdown-hook