diff options
| author | Kenichi Handa | 2006-06-16 12:27:28 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2006-06-16 12:27:28 +0000 |
| commit | 03ef560c9ae56a081b307d0481759ce31f3ee8f7 (patch) | |
| tree | 9d070688a288f456f12b24978eb6a1e76a94e120 /src | |
| parent | 0169d3603b5085ed238feca83b9ab396d3350d8f (diff) | |
| download | emacs-03ef560c9ae56a081b307d0481759ce31f3ee8f7.tar.gz emacs-03ef560c9ae56a081b307d0481759ce31f3ee8f7.zip | |
(new_fontset_from_font) [USE_FONT_BACKEND]: Argument F
deleted. Don't call Fnew_fontset. Instead, directly call
make_fontset.
Diffstat (limited to 'src')
| -rw-r--r-- | src/fontset.c | 36 |
1 files changed, 29 insertions, 7 deletions
diff --git a/src/fontset.c b/src/fontset.c index 1c2f4b7b8f1..1adc0e0cc19 100644 --- a/src/fontset.c +++ b/src/fontset.c | |||
| @@ -1834,17 +1834,39 @@ new_fontset_from_font_name (Lisp_Object fontname) | |||
| 1834 | 1834 | ||
| 1835 | #ifdef USE_FONT_BACKEND | 1835 | #ifdef USE_FONT_BACKEND |
| 1836 | int | 1836 | int |
| 1837 | new_fontset_from_font (f, font_object) | 1837 | new_fontset_from_font (font_object) |
| 1838 | FRAME_PTR f; | ||
| 1839 | Lisp_Object font_object; | 1838 | Lisp_Object font_object; |
| 1840 | { | 1839 | { |
| 1841 | Lisp_Object xlfd = Ffont_xlfd_name (font_object); | 1840 | Lisp_Object font_name = font_get_name (font_object); |
| 1842 | int id = new_fontset_from_font_name (xlfd); | 1841 | Lisp_Object font_spec = font_get_spec (font_object); |
| 1843 | Lisp_Object fontset = FONTSET_FROM_ID (id); | 1842 | Lisp_Object short_name, name, fontset; |
| 1844 | 1843 | ||
| 1845 | FONTSET_ASCII (fontset) = build_string (font_get_name (font_object)); | 1844 | if (NILP (auto_fontset_alist)) |
| 1845 | short_name = build_string ("fontset-startup"); | ||
| 1846 | else | ||
| 1847 | { | ||
| 1848 | char temp[32]; | ||
| 1849 | int len = XINT (Flength (auto_fontset_alist)); | ||
| 1846 | 1850 | ||
| 1847 | return id; | 1851 | sprintf (temp, "fontset-auto%d", len); |
| 1852 | short_name = build_string (temp); | ||
| 1853 | } | ||
| 1854 | ASET (font_spec, FONT_REGISTRY_INDEX, short_name); | ||
| 1855 | name = Ffont_xlfd_name (font_spec); | ||
| 1856 | if (NILP (name)) | ||
| 1857 | { | ||
| 1858 | int i; | ||
| 1859 | |||
| 1860 | for (i = 0; i < FONT_SIZE_INDEX; i++) | ||
| 1861 | if ((i != FONT_FAMILY_INDEX) && (i != FONT_REGISTRY_INDEX)) | ||
| 1862 | ASET (font_spec, i, Qnil); | ||
| 1863 | name = Ffont_xlfd_name (font_spec); | ||
| 1864 | if (NILP (name)) | ||
| 1865 | abort (); | ||
| 1866 | } | ||
| 1867 | fontset = make_fontset (Qnil, name, Qnil); | ||
| 1868 | FONTSET_ASCII (fontset) = font_name; | ||
| 1869 | return XINT (FONTSET_ID (fontset)); | ||
| 1848 | } | 1870 | } |
| 1849 | 1871 | ||
| 1850 | struct font * | 1872 | struct font * |