Archive for the ‘Design/graphics’ Category

Adobe CS4 is down for counting

Wednesday, December 10th, 2008

As soon as Adobe CS4 was released we got our hands on it. Since I’ve been doing quite a lot Flash things lately I was hoping the new version would reveal some greate new features. However after trying it for couple of weeks now, I can only summarize the experience as; grumpy. To begin with Flash crashes for me when opening most of my old cs3 files, doesn’t recognize an old flash project file (.flp), crashes totaly if I’m to fast clicking around (hey.. it’s fun to click around with the mouse). The last behaviour is the same for the other nifty tools such as Illustrator and Fireworks.

They die right in front of me leaving me with a broken (long-time-since-last-save) file. Some say it’s about fonts, some say it’s about somethingelse. I saw someone who solved it by buying a new computer..

I contacted Adobe in for the subject, posted an error report and gave them full dumps of my machines current state.. getting the reply to go through a bunch of help yourself links with twenty steps each! Things like that make me grumby.

Anyway.. I’ve tried reinstalling the entire CS4 premium package (uninstall and install taking for ages) without success.. and yeah. one last thing.. Acrobat reader now crashes if I try to open a pdf link within the (a/any) browser. Thanks..

regards,
A grumpy web developer

GMENU/GIFBUILDER broke my swedish characters

Thursday, March 8th, 2007

We’ve been working on a site for a customer for some time now based on TYPO3. As the the respect to typographical issues where important we decided to go forth using GMENU and GIFBUILDER for menus and headings. I really like the concept of GIFBUILDER and working with it. Sadly we got problems with non ascii characters like our swedish åäö and such. They where replaced by ugly boxes.

Character Ö is replaced by a box..

So, why on earth did this happend I questioned my self.. and people on #typo3 @ irc.freenode.org.

I ended up with these suggestions/requirements:

  1. Make sure you use utf-8 all the way. Gifbuilder (probably GD/freetype really)
  2. Check that the font you use is unicode
  3. Check configuration for mbstring (or iconv) that gifbuilder uses

I did all this. Utf-8 was a requirement for the project as the site will be on both chinese, swedish and english. The font seemed to be in Unicode as well (as far as I could tell). And mbstring was working like a charm..

It’s importent to mention that the development server was a windows server.

Anyway. I copied the site to my local windows computer and tested it. The same buggy result. The I copied it to my own webserver running on debian linux and there it worked! Why? Donno.. However. I went back to my local computer and replaced the font with arial. I got nifty åäö all the sudden. This at least allowed me to assume that it had something to do with the font file (a .otf file btw). The only solution I could think of now would be to convert the font hopfully to utf-8. I got merely no experience with typographical things so this was a blank area for me, but after som googleing I stumbled upon fontforge (http://fontforge.sf.net). It’s actually a *NIX application but I installed Cygwin (along with xfce4), and the cygwin port of fontforge. Wow what an app! A really crappy gui, but wow! :)

fontforge with cygwin

So, I went on and converted my .otf font forcing it to Full unicode, replaced it in my exsisting font on the site. It worked like a charm!

My final configuration on every aspect turned out like this:

localconf.php:

  1.  
  2. // UTF-8 support
  3. $TYPO3_CONF_VARS[‘GFX’][‘gdlib_2′] = ’1′;
  4. $TYPO3_CONF_VARS[‘BE’][‘forceCharset’] = ‘utf-8′
  5. // For GIFBUILDER support
  6. // Set it to ‘iconv’ or ‘mbstring’
  7. $TYPO3_CONF_VARS[‘SYS’][‘t3lib_cs_convMethod’] = ‘mbstring’;
  8. // For ‘iconv’ support you need PHP 5!
  9. $TYPO3_CONF_VARS[‘SYS’][‘t3lib_cs_utils’] = ‘mbstring’;
  10. // For Asian languages
  11. $TYPO3_CONF_VARS[‘SYS’][‘multiplyDBfieldSize’] = 3;
  12. //force db communication to utf8
  13. $TYPO3_CONF_VARS[‘SYS’][‘setDBinit’] = ‘SET NAMES utf8;’;
  14.  

Typoscript

  1.  
  2.  
  3. ## GIFBUILDER HEADING RENDER SETUP ########
  4. ##
  5. ##### Header 1
  6. cHeader1 = IMAGE
  7. cHeader1 {
  8.     alttext.cObject = TEXT
  9.     alttext.cObject.field = header
  10.     wrap = <div class="h1gfx">|</div>
  11.     file = GIFBUILDER
  12.     file {
  13.         format = gif
  14.         reduceColors = 15
  15.         transparentColor = #ffffff
  16.         XY = [10.w]+2,[10.h]+8
  17.         backColor = #ffffff
  18.         10 = TEXT
  19.         10 {
  20.     text.field = header
  21.     fontSize = 14
  22.     offset = 0,20
  23.     fontColor = #333333
  24.     fontFile = fileadmin/fonts/NewsGothicStd_utffull.ttf
  25.     antiAlias = 1
  26.     value.case = upper
  27.         }
  28.     }
  29. }
  30.  

Database was set to full utf-8 charset in all tables from the beginning.

See http://wiki.typo3.org/index.php/UFT-8_support about utf-8 support for TYPO3.