Re: Manual to install Swisscenter on Synology DSx0 - 2008/10/03 10:42Hi Babachan,
I had a quick glance and it looks very promising. I'll experiment a bit with font sizes: except for "Now Playing" the fonts are quite small (at least for me ). Could you give me a hint where to change them? And how are the various ".GDF"-files called by the script?
Moreover, on my machine the text is wrapped too 'early', meaning I've got plenty of space on my screen, but still the text is wrapped. Where can I adjust that one?
looking forward to your reply, regards, Klaas --------------------------------------------------------------------------- SwissCenter SVN 1091 Simese 1.40 / PHP 4.4.4 / MySQL 4.0.21 / Windows XP Apache 2.2.8 / PHP 5.2.6 / MySQL 5.0.51b / Linux Synology 2.6.15 Synology DS107+ (128), firmware: DSM 2.0-0702 Pinnacle SC200
| | The administrator has disabled public write access.
BABACHAN
User
Posts: 43
Re: Manual to install Swisscenter on Synology DSx0 - 2008/10/03 10:55I'll experiment a bit with font sizes: except for "Now Playing" the fonts are quite small (at least for me ). Could you give me a hint where to change them? That is strange. The size should be the same on your machine. Did you use the supplied fonts or make your own?
And how are the various ".GDF"-files called by the script? The functions text(), get_text_width() and get_text_height() from image.php load the font based on the size given. They format the arial_tt%d.gdf (from the configuration) into for instance arial_tt14.gdf for size 14. If you want bigger font size you have to recreate the font files. The supplied files are 1.3 larger than the ttf sizes. For instance when a size of 14 is requested the file arial_ttf14.gdf is loaded and this file contains a converted 14*1.3 sized font.
Moreover, on my machine the text is wrapped too 'early', meaning I've got plenty of space on my screen, but still the text is wrapped. Where can I adjust that one? This is even stranger. Because the wrap is based on the actual text width and the screen size. Did you alter your image_screen.php or did you use the on I posted?SwissCenter 1.21.1 client: Popcorn Hour A-100 servers: Synology DS207+ (128) firmware DSM 2.0-0722 servers: Windows XP SP2
| | The administrator has disabled public write access.
klaasvaak
User
Posts: 464
Re: Manual to install Swisscenter on Synology DSx0 - 2008/10/03 12:04Hi Babachan,
Wrapping issue is solved (I had an error in my code).
Regarding the font size I still got some problems. I don't see how I can change the font size within the code (or shouldn't I). What I can see, that you use three font size 13, 15 and 21. What I can do is using other fonts (the ones I already created) and save 'em as "arial_tt13.gdf", arial_tt15.gdf (the one for "Now Playing" is big enough for me ). But I suppose there should be a more cleaver way to do deal with this.
Moreover, would you be able to create a fourth size for previous, next, playing time and track number?
regards, Klaas --------------------------------------------------------------------------- SwissCenter SVN 1091 Simese 1.40 / PHP 4.4.4 / MySQL 4.0.21 / Windows XP Apache 2.2.8 / PHP 5.2.6 / MySQL 5.0.51b / Linux Synology 2.6.15 Synology DS107+ (128), firmware: DSM 2.0-0702 Pinnacle SC200
| | The administrator has disabled public write access.
BABACHAN
User
Posts: 43
Re: Manual to install Swisscenter on Synology DSx0 - 2008/10/03 14:03Hi Klaas,
Nice to hear that the wrapping is working.
Now about the font size. There is no need to change the size in the code. The swisscenter code uses sizes 13, 14, 15, 21, 22, 24, 25 and 36. These are in percentages. These sizes are converted to points based on the display resolution. For instance, my resolution is 720x576 (displayed in support info as clients detected). The font size 22 is converted to ceiling(576 * 21 / 1000) = 13. The Text() function displays a true type font with this font size. So far what I figured out from the original code. Correct me if I wrong . I altered the Text() to display a GD font if selected in the config. So it will load font arial_ttf13.gdf. This file actually contains a GD font with size 22 * 1.3 = 28. Because I found out that the true type size is actually 1.3 times bigger on the display then the same gd font size.
So to end my story. If you want bigger fonts you have to make them yourself as described in step 14a. For instance, use size 30 instead of 28 and save it as arial_ttf13.gdf. For more detailed info on the actual file contents of a gdf file see hereSwissCenter 1.21.1 client: Popcorn Hour A-100 servers: Synology DS207+ (128) firmware DSM 2.0-0722 servers: Windows XP SP2
| | The administrator has disabled public write access.
klaasvaak
User
Posts: 464
Re: Manual to install Swisscenter on Synology DSx0 - 2008/10/03 16:14Hi Babachan,
Got the font nice now and the "PLAY NOW"-screen looks fine. Again some problems with the "wrap" function; the spacing is too large for the fonts I llike to use, but I'll try to work it out. If any issues pop up, I'll drop you a line.
anyway many thanks, regards, Klaas --------------------------------------------------------------------------- SwissCenter SVN 1091 Simese 1.40 / PHP 4.4.4 / MySQL 4.0.21 / Windows XP Apache 2.2.8 / PHP 5.2.6 / MySQL 5.0.51b / Linux Synology 2.6.15 Synology DS107+ (128), firmware: DSM 2.0-0702 Pinnacle SC200
| | The administrator has disabled public write access.
BABACHAN
User
Posts: 43
Re: Manual to install Swisscenter on Synology DSx0 - 2008/10/04 03:14Hi Klaas,
The spacing is not determined by the code. It is part of the font file. If you don't like the spacing you have too use a smaller character width when creating the font. I used the formula: character width = font size / 1.5. This ensures that the wide characters like M and W are not overlapping the other characters. But again its up to you to decide. You are experiencing the disadvantages of fixed width font. We have to live with that SwissCenter 1.21.1 client: Popcorn Hour A-100 servers: Synology DS207+ (128) firmware DSM 2.0-0722 servers: Windows XP SP2
| | The administrator has disabled public write access.
klaasvaak
User
Posts: 464
Re: Manual to install Swisscenter on Synology DSx0 - 2008/10/05 14:23As per today the manual is updated and an improved “Now Playing”-screen is available. Thanks to BABACHAN for the great contribution.
The “Now Playing”-screen has now three different font sizes and became language unspecific. Instructions can be found under step [11] and [12] of the manual.
regards, Klaas --------------------------------------------------------------------------- SwissCenter SVN 1091 Simese 1.40 / PHP 4.4.4 / MySQL 4.0.21 / Windows XP Apache 2.2.8 / PHP 5.2.6 / MySQL 5.0.51b / Linux Synology 2.6.15 Synology DS107+ (128), firmware: DSM 2.0-0702 Pinnacle SC200
| | The administrator has disabled public write access.
Joe_999
User
Posts: 83
Re: Manual to install Swisscenter on Synology DSx0 - 2008/10/26 19:56Hi Klaas, Hi Babachan,
while doing a fresh installation of SVN1108 I had to use Klaas´s earlier image.php in order to get the SC config screen displaying the SC installation test results being displayed.
The files as currrently linked to in the "Manual" didn´t do it for me!
I will do a step by step approach as soon as I will have some time and report!
Regards
JoeClients: Popcorn A-100, Mozilla Firefox on MS Vista Business SP1.0 Media storage on NAS: Synology DS207+ 1st SC 1.21.1 SVN1117 installed on DS207+ with FW 7.22 utilizing: Apache 2.2.8 (Unix) mod_ssl/2.2.8, MySQL 5.0.51b, OpenSSL 0.9.8g, PHP 5.2.6 2nd SC 1.21.1 SVN1117 installed on WIN-XP, Simese 2.07, PHP 4.4.4, mySQL 4.0.21 GbE network with Zyxel GS-108A PCH-A100 connected via HDMI in 1920x1080p to display.
| | The administrator has disabled public write access.