Added new function DEVICE-TO-PANGO-UNITS and fixed a minor typo
authorespen <espen>
Wed, 17 Oct 2007 18:07:32 +0000 (18:07 +0000)
committerespen <espen>
Wed, 17 Oct 2007 18:07:32 +0000 (18:07 +0000)
pango/pango.lisp

index 52b75d4..4b8bc75 100644 (file)
 ;; TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 ;; SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
-;; $Id: pango.lisp,v 1.15 2007-09-07 07:39:59 espen Exp $
+;; $Id: pango.lisp,v 1.16 2007-10-17 18:07:32 espen Exp $
 
 (in-package "PANGO")
 
+(defconstant +pango-scale+ 1024)
+
+(defun device-to-pango-units (device-units)
+  (round (* device-units +pango-scale+)))
+
 (eval-when (:compile-toplevel :load-toplevel :execute)
   (init-types-in-library pango "libpango-1.0" :prefix "pango_")
   (init-types-in-library pango "libpangoxft-1.0" :prefix "pango_xft")
     :allocation :virtual
     :initarg :indent
     :getter "pango_layout_get_indent"
-    :setter "pango_layout_set_indetn"
+    :setter "pango_layout_set_indent"
     :accessor layout-indent
     :type int)
    (spacing