[ZBXNEXT-834] Automatically change font based on user's profile Created: 2011 Jul 07 Updated: 2012 Oct 14 |
|
| Status: | Open |
| Project: | ZABBIX FEATURE REQUESTS |
| Component/s: | Frontend (F) |
| Affects Version/s: | 1.9.4 (alpha) |
| Fix Version/s: | None |
| Type: | Change Request | Priority: | Trivial |
| Reporter: | Brian Huang | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
I suggest a way to automatically change the font based on the user's profile. Referred to my own idea: http://www.zabbix.com/forum/showthread.php?t=22148&page=2, this approach can automatically change font just by using soft links to the font files and the locale names as the names of the soft links: First, I added a function setFontnames() into the file include/locales.inc.php as followed. function setFontnames() { global $USER_DETAILS; $ZBX_FONT_NAME = $USER_DETAILS['lang']; $ZBX_GRAPH_FONT_NAME = $USER_DETAILS['lang']; }In the directory fonts, I added some Unicode fonts and added soft links: Finally, I called setFontnames() in the file include/graphs.inc.php at the beginning of each of the following functions: function imageText($image, $fontsize, $angle, $x, $y, $color, $string) { setFontnames(); ... }function imageTextSize($fontsize, $angle, $string){ setFontnames(); ... } Instead of the final step, it would be better to change the font name whenever a user's language has been changed. |
| Comments |
| Comment by Brian Huang [ 2011 Jul 29 ] |
|
Does that mean this feature will be implemented in version 2.0? If so, I have some suggestions: 1. Font Management: A user can click on a button to browse a font file on the local drive. The user also select a language for that font. After uploading the font for the language. The system automatically create symbolic links for the font and the language. 2. Automatic font change and fallback: The system will then automatically use the font based on the language the user has selected. If not found, fall back to the default one. That is, there is a fallback font. |
| Comment by Brian Huang [ 2012 Jul 01 ] |
|
I just rebuilt zabbix 2.0.1rc2 and made the font change as followed: I just build 2.0.1, the issue still exists. No font auto change either. |
| Comment by Brian Huang [ 2012 Jul 01 ] |
|
I also need to modify locales.inc.php ,in addition to And, the fonts: |