… | |
… | |
84 | |
84 | |
85 | static void |
85 | static void |
86 | substitute_func (FcPattern *pattern, gpointer data) |
86 | substitute_func (FcPattern *pattern, gpointer data) |
87 | { |
87 | { |
88 | FcPatternAddBool (pattern, FC_HINTING , 1); |
88 | FcPatternAddBool (pattern, FC_HINTING , 1); |
|
|
89 | #ifdef _WIN32 |
89 | FcPatternAddBool (pattern, FC_AUTOHINT, 1); |
90 | FcPatternAddBool (pattern, FC_AUTOHINT, 1); |
|
|
91 | #else |
|
|
92 | FcPatternAddBool (pattern, FC_AUTOHINT, 0); |
|
|
93 | #endif |
90 | } |
94 | } |
91 | |
95 | |
92 | static void |
96 | static void |
93 | layout_update_font (CFClient__Layout self) |
97 | layout_update_font (CFClient__Layout self) |
94 | { |
98 | { |
… | |
… | |
799 | set_width (CFClient::Layout self, int max_width = -1) |
803 | set_width (CFClient::Layout self, int max_width = -1) |
800 | CODE: |
804 | CODE: |
801 | pango_layout_set_width (self->pl, max_width < 0 ? max_width : max_width * PANGO_SCALE); |
805 | pango_layout_set_width (self->pl, max_width < 0 ? max_width : max_width * PANGO_SCALE); |
802 | |
806 | |
803 | void |
807 | void |
|
|
808 | set_indent (CFClient::Layout self, int indent) |
|
|
809 | CODE: |
|
|
810 | pango_layout_set_indent (self->pl, indent * PANGO_SCALE); |
|
|
811 | |
|
|
812 | void |
|
|
813 | set_spacing (CFClient::Layout self, int spacing) |
|
|
814 | CODE: |
|
|
815 | pango_layout_set_spacing (self->pl, spacing * PANGO_SCALE); |
|
|
816 | |
|
|
817 | void |
|
|
818 | set_ellipsise (CFClient::Layout self, int ellipsise) |
|
|
819 | CODE: |
|
|
820 | pango_layout_set_ellipsize (self->pl, |
|
|
821 | ellipsise == 1 ? PANGO_ELLIPSIZE_START |
|
|
822 | : ellipsise == 2 ? PANGO_ELLIPSIZE_MIDDLE |
|
|
823 | : ellipsise == 3 ? PANGO_ELLIPSIZE_END |
|
|
824 | : PANGO_ELLIPSIZE_NONE |
|
|
825 | ); |
|
|
826 | |
|
|
827 | void |
|
|
828 | set_single_paragraph_mode (CFClient::Layout self, int spm) |
|
|
829 | CODE: |
|
|
830 | pango_layout_set_single_paragraph_mode (self->pl, !!spm); |
|
|
831 | |
|
|
832 | void |
804 | size (CFClient::Layout self) |
833 | size (CFClient::Layout self) |
805 | PPCODE: |
834 | PPCODE: |
806 | { |
835 | { |
807 | int w, h; |
836 | int w, h; |
808 | |
837 | |