Cairo__FontFace.st
changeset 40 28dfc583beb5
parent 30 c8fe298c8cc7
child 43 1006839761af
equal deleted inserted replaced
39:8af34937e1ec 40:28dfc583beb5
     7 	classVariableNames:''
     7 	classVariableNames:''
     8 	poolDictionaries:''
     8 	poolDictionaries:''
     9 	category:'Cairo-Objects'
     9 	category:'Cairo-Objects'
    10 !
    10 !
    11 
    11 
       
    12 
       
    13 !FontFace class methodsFor:'instance creation'!
       
    14 
       
    15 fromFontDescription: aFontDescription
       
    16     Screen current platformName == #X11 ifTrue:[ 
       
    17         | pattern |
       
    18 
       
    19         pattern := FcPattern fromFontDescription: aFontDescription.
       
    20         ^ CPrimitives cairo_ft_font_face_create_for_pattern: pattern.
       
    21     ].
       
    22     self error: 'Noy yet implemented'.
       
    23 
       
    24     "
       
    25     Cairo::FontFace fromFontDescription: CodeView defaultFont
       
    26     "
       
    27 
       
    28     "Created: / 17-02-2016 / 20:01:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
    29 ! !
    12 
    30 
    13 !FontFace class methodsFor:'accessing'!
    31 !FontFace class methodsFor:'accessing'!
    14 
    32 
    15 dllPath
    33 dllPath
    16 
    34 
    54     "Returns size of undelaying structure in bytes"
    72     "Returns size of undelaying structure in bytes"
    55 
    73 
    56     ^0
    74     ^0
    57 ! !
    75 ! !
    58 
    76 
       
    77 !FontFace methodsFor:'accessing'!
       
    78 
       
    79 referenceCount
       
    80     "Return value or reference counter"
       
    81 
       
    82     ^ CPrimitives cairo_font_face_get_reference_count: self
       
    83 
       
    84     "Modified: / 17-02-2016 / 19:54:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
    85 !
       
    86 
       
    87 type
       
    88     "This function returns the type of the backend used to create a font face. 
       
    89      See FontType for available types."
       
    90 
       
    91     ^ CPrimitives cairo_font_face_get_type: self
       
    92 
       
    93     "Created: / 17-02-2016 / 19:54:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
    94 ! !
       
    95 
       
    96 !FontFace methodsFor:'private'!
       
    97 
       
    98 destroy
       
    99     "Tell Cairo library to destroy the corresponding C object.
       
   100      Remember that object is physically destroyed only if internal
       
   101      refcounter goes to zero. However, after calling destroy,
       
   102      this instance should be treated as invalid."
       
   103 
       
   104     ^ CPrimitives cairo_font_face_destroy: self
       
   105 
       
   106     "Modified: / 17-02-2016 / 19:54:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
   107 ! !
       
   108 
    59 !FontFace class methodsFor:'documentation'!
   109 !FontFace class methodsFor:'documentation'!
    60 
   110 
    61 version
   111 version
    62     ^'$Id$'
   112     ^'$Id$'
    63 !
   113 !