I am using textimage with a fonts directory that has a LOT of fonts. It is difficult to browse for them because
- They are not in alphabetical order
- Some filenames are all lower case, some are all uppercase, some are mixed, making it very difficult to read.
(Someone suggested I 'type' into the select box to get the font that I want - however this hasn't proved to be effective, because often the only difference between font files in different parts of the list is one or two letters at the end. It would be nice if similar fonts were listed next to each other, so we could see "oh there's a bold version, and italic version, etc...".
Here is what I've done to rectify this:
find this line in textimage.module:
[code]
$form['settings']['text']['font'] = array(
[/code]
and right before it, insert this:
[code]
foreach($font_options as $font=>$options) {
$font_options[$font] = strtolower($font_options[$font]);
}
asort($font_options);
[/code]
The loop converts all the listed options into lowercase for consistency. The asort part then alphabetizes the list.
Please consider doing something similar in future revisions of textimage. I do not posses the means to create a patch.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | textimage_fontlist.patch | 502 bytes | danielb |
Comments
Comment #1
danielb commented*sigh* for your benefit:
find this line in textimage.module:
and right before it, insert this:
Comment #2
danielb commentedI have learned how to make patches :D
Comment #3
GreenJelly commentedI understand these patch files... still dont know how they work... I am not having this problem, but I have seen better test results if you put the entire function that needs to be tested up.
Comment #4
danielb commentedwhat
Comment #5
deciphered@danielb
Patch is good as is the idea, however I've done you one better, the next dev build will actually display the real name of the font (in alphabetical order).
Comment #6
decipheredCommitted to HEAD.
Will be available shortly in 5.x-2.x-dev.
Comment #7
decipheredComment #8
danielb commentedvery nice ;)