The Joomla! Forum ™






Post new topic Reply to topic  [ 55 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Fri Feb 09, 2007 11:59 am 
User avatar
Joomla! Ace
Joomla! Ace

Joined: Sun Dec 10, 2006 6:39 pm
Posts: 1143
Location: Czech Republic
This is an instruction how to create PDF document with Latin 2 characters under Joomla! 1.5  (I have tried only CZECH language, but I think, other central European languages - Czech, Slovak, Croatian, Slovenian, ... - will work too)

1. Create new ufm file e.g. freemono - ttf2ufm -a -F freemono.ttf - you need ttf2ufm.exe in joomla/libraries/tcpdf/tools
2. Attention - ttf2ufm.exe creates ufm file with error: Character "Ċ" instead of "č". You need to edit this ufm file:

Change this code from:
U 266 ; WX 600 ; N Cdotaccent ; G 204 ;
U 269 ; WX 600 ; N ccaron ; G 207 ;


to:
U 266 ; WX 600 ; N Cdotaccent ; G 207 ;
U 269 ; WX 600 ; N ccaron ; G 204 ;


(Changing values: Cdotaccent -> ccaron, ccaron -> Cdotaccent - [color=red]you must change G values and WX values too, if they are different[/color])
It is only example. Some ufm files doesn't contain "Cdotaccent" but only "Cdot". If you need "Ċ", don't do this change (Thanks karol.cejka for his advice)

At the end, you create freemono.php , freemono.z, freemono.ctg.z: php -q makefontuni.php freemono.ttf freemono.ufm - you need makefontuni.php in joomla/libraries/tcpdf/tools
and you copy this files (freemono.php , freemono.z, freemono.ctg.z) to joomla/language/pdf_fonts/

Don't forget to change your language xml file (e.g cs-CZ.xml in joomla/language/cs-CZ/):
Code:
<pdfFontName>freemono</pdfFontName>


And it should work.  :P


You do not have the required permissions to view the files attached to this post.

_________________
- Phoca Gallery - simple image gallery with slideshow - http://www.phoca.cz/phocagallery/
- Phoca Restaurant Menu - http://www.phoca.cz/restaurantmenudemo/


Last edited by H13 on Fri Feb 09, 2007 7:29 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Fri Feb 09, 2007 1:41 pm 
User avatar
Joomla! Master
Joomla! Master

Joined: Fri Aug 12, 2005 3:47 pm
Posts: 17321
Location: **Translation Matters**
Thanks H13,
Please have alook here
http://forge.joomla.org/sf/frs/do/viewR ... .pdf_fonts

_________________
Jean-Marie Simonet / infograf · http://www.info-graf.fr
Multilanguage in 2.5: http://help.joomla.org/files/EN-GB_multilang_tutorial.pdf
---------------------------------
Joomla Translation Coordination Team • Joomla! Production Working Group


Top
 Profile  
 
PostPosted: Fri Feb 09, 2007 1:52 pm 
User avatar
Joomla! Ace
Joomla! Ace

Joined: Sun Dec 10, 2006 6:39 pm
Posts: 1143
Location: Czech Republic
infograf768 wrote:


I don't understand. There are fonts, they don't support latin 2 languages?

_________________
- Phoca Gallery - simple image gallery with slideshow - http://www.phoca.cz/phocagallery/
- Phoca Restaurant Menu - http://www.phoca.cz/restaurantmenudemo/


Top
 Profile  
 
PostPosted: Fri Feb 09, 2007 1:54 pm 
User avatar
Joomla! Master
Joomla! Master

Joined: Fri Aug 12, 2005 3:47 pm
Posts: 17321
Location: **Translation Matters**
all utf8, see the list I posted in the other thread concerning their usage.

_________________
Jean-Marie Simonet / infograf · http://www.info-graf.fr
Multilanguage in 2.5: http://help.joomla.org/files/EN-GB_multilang_tutorial.pdf
---------------------------------
Joomla Translation Coordination Team • Joomla! Production Working Group


Top
 Profile  
 
PostPosted: Fri Feb 09, 2007 2:00 pm 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Thu Nov 10, 2005 10:22 am
Posts: 177
Location: Prague, Czech Republic
ttf2ufm have a bug. H13 have pretty cool hack/update for Czech / Slovak language.

_________________
Karol Čejka · CET (UTC+1)
* Slovak (sk-SK) Joomla! Translation
* Slovak (sk-SK) Translation Services


Top
 Profile  
 
PostPosted: Fri Feb 09, 2007 2:11 pm 
User avatar
Joomla! Master
Joomla! Master

Joined: Fri Aug 12, 2005 3:47 pm
Posts: 17321
Location: **Translation Matters**
Could you specify which glyphs are available for that font and advantages compared to those already provided?

We may just include the new font on Forge.

_________________
Jean-Marie Simonet / infograf · http://www.info-graf.fr
Multilanguage in 2.5: http://help.joomla.org/files/EN-GB_multilang_tutorial.pdf
---------------------------------
Joomla Translation Coordination Team • Joomla! Production Working Group


Top
 Profile  
 
PostPosted: Fri Feb 09, 2007 2:33 pm 
User avatar
Joomla! Ace
Joomla! Ace

Joined: Sun Dec 10, 2006 6:39 pm
Posts: 1143
Location: Czech Republic
It is not so easy.

Fonts in forge.joomla.org don't support Czech/Slovak/...(Latin 2) languages (or they do but not correctly).

If we create new font with help of ttf2ufm, it supports Czech/Slovak/... languages but ttf2ufm have a bug and PDF document shows "Ċ" instead of "č". We can hack it and PDF document will show it correctly. But character "Ċ" will be missing. Czech and Slovak languages don't need this character "Ċ", so it is all right. But there can be languages (I don't know), they need both characters "Ċ" and "č" and this can be problem. This solution isn't 100% for some Latin2 languages.

_________________
- Phoca Gallery - simple image gallery with slideshow - http://www.phoca.cz/phocagallery/
- Phoca Restaurant Menu - http://www.phoca.cz/restaurantmenudemo/


Last edited by H13 on Fri Feb 09, 2007 2:54 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Fri Feb 09, 2007 3:27 pm 
User avatar
Joomla! Ace
Joomla! Ace

Joined: Sun Dec 10, 2006 6:39 pm
Posts: 1143
Location: Czech Republic
This hack can be used in the following languages (They contain character "č") : Lithuanian, Latvian, Croatian, Slovenian, Slovak, Czech, ...

_________________
- Phoca Gallery - simple image gallery with slideshow - http://www.phoca.cz/phocagallery/
- Phoca Restaurant Menu - http://www.phoca.cz/restaurantmenudemo/


Last edited by H13 on Fri Feb 09, 2007 3:33 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Fri Feb 09, 2007 4:15 pm 
Joomla! Explorer
Joomla! Explorer

Joined: Thu Aug 18, 2005 1:47 pm
Posts: 266
Yes I've had the same problem with every font I compiled.
Thank you for the solution, I'll try it later and report back.


Quote:
all utf8, see the list I posted in the other thread concerning their usage


Jean-Marie, I've read those threads several times and it looks to me that included Vera font should work for latin2 range of languages. Am I wrong about this?

_________________
Please read the Forum rules regarding signatures: viewtopic.php?t=65


Top
 Profile  
 
PostPosted: Sat Feb 10, 2007 6:14 am 
User avatar
Joomla! Master
Joomla! Master

Joined: Fri Aug 12, 2005 3:47 pm
Posts: 17321
Location: **Translation Matters**
UNhappily I am not the specialist on these matters.
At reading David's post, this is what we get for Vera:
Quote:
Specifications for Vera font - this font is suitable for Western and Central European languages
Bitstream Vera Sans :
Basic Latin (95 out of 128 characters)
Latin-1 Supplement (96 out of 128 characters)
Latin Extended-A (20 out of 128 characters)
Latin Extended-B (1 out of 194 characters)

Spacing Modifier Letters (8 out of 80 characters)
Greek and Coptic (2 out of 124 characters)
General Punctuation (15 out of 106 characters)
Currency Symbols (1 out of 22 characters)
Letterlike Symbols (1 out of 77 characters)
Mathematical Operators (14 out of 256 characters)
Geometric Shapes (1 out of 96 characters)
Alphabetic Presentation Forms (2 out of 58 characters)


So it looks like some characters are missing indeed.

_________________
Jean-Marie Simonet / infograf · http://www.info-graf.fr
Multilanguage in 2.5: http://help.joomla.org/files/EN-GB_multilang_tutorial.pdf
---------------------------------
Joomla Translation Coordination Team • Joomla! Production Working Group


Top
 Profile  
 
PostPosted: Sat Feb 10, 2007 1:10 pm 
User avatar
Joomla! Ace
Joomla! Ace

Joined: Sun Dec 10, 2006 6:39 pm
Posts: 1143
Location: Czech Republic
Jean-Marie, Vera font (forge.joomla.org) doesn't support Central European languages. There (forge.joomla.org) are other fonts, they support Central European languages but they contain error. This error ("Ċ" instead of "č") affects following languages:

- Lithuanian
- Latvian
- Croatian
- Slovenian
- Slovak
- Czech.

There are three possibilities how we can solve it:

1. We do nothing. Every user will create own font.
2. Somebody repair a bug in ttf2ufm (there is a source code).
3. We will create special font for affected languages.

???

_________________
- Phoca Gallery - simple image gallery with slideshow - http://www.phoca.cz/phocagallery/
- Phoca Restaurant Menu - http://www.phoca.cz/restaurantmenudemo/


Top
 Profile  
 
PostPosted: Sat Feb 10, 2007 4:07 pm 
User avatar
Joomla! Master
Joomla! Master

Joined: Fri Aug 12, 2005 3:47 pm
Posts: 17321
Location: **Translation Matters**
H13, I would not know how to repair that ttf2ufm file.

If there are errors in the files present on Forge (which specific files please?), do you think you could correct them and let me know when available?
I will be pleased to replace the buggy ones with the corrected ones so as to let all Partners and users have access to them..

Thanks for your support.

_________________
Jean-Marie Simonet / infograf · http://www.info-graf.fr
Multilanguage in 2.5: http://help.joomla.org/files/EN-GB_multilang_tutorial.pdf
---------------------------------
Joomla Translation Coordination Team • Joomla! Production Working Group


Top
 Profile  
 
PostPosted: Sat Feb 10, 2007 4:58 pm 
User avatar
Joomla! Ace
Joomla! Ace

Joined: Sun Dec 10, 2006 6:39 pm
Posts: 1143
Location: Czech Republic
Vera – doesn't support: č, ď, ě, ň, ř, ť, ů, Ď, Ě, Ň, Ř, Ť, Ů (Czech characters) – this font doesn't support Latin 2 characters

DejaVuSans – supports Latin 2 characters but with one error ("Ċ" instead of "č")
CyberBase - supports Latin 2 characters but with one error ("Ċ" instead of "č")
FreeSans - supports Latin 2 characters but with one error ("Ċ" instead of "č")
Romanuni - supports Latin 2 characters but with one error ("Ċ" instead of "č")
FreeSerif - supports Latin 2 characters but with one error ("Ċ" instead of "č")
Cyberbit - supports Latin 2 characters but with one error ("Ċ" instead of "č")
CyberCJK - supports Latin 2 characters but with one error ("Ċ" instead of "č")

But I can't correct these files, I can replace "Ċ" by "č". It is solution for discussed languages. If I do it, character "Ċ" will be missing and this can cause problems in other languages  ???

_________________
- Phoca Gallery - simple image gallery with slideshow - http://www.phoca.cz/phocagallery/
- Phoca Restaurant Menu - http://www.phoca.cz/restaurantmenudemo/


Top
 Profile  
 
PostPosted: Sat Feb 10, 2007 6:33 pm 
User avatar
Joomla! Master
Joomla! Master

Joined: Fri Aug 12, 2005 3:47 pm
Posts: 17321
Location: **Translation Matters**
Understood now fully.

I'll ask if this glyph is used or not by any of our Translators.

_________________
Jean-Marie Simonet / infograf · http://www.info-graf.fr
Multilanguage in 2.5: http://help.joomla.org/files/EN-GB_multilang_tutorial.pdf
---------------------------------
Joomla Translation Coordination Team • Joomla! Production Working Group


Top
 Profile  
 
PostPosted: Sat Feb 10, 2007 6:37 pm 
User avatar
Joomla! Ace
Joomla! Ace

Joined: Sun Dec 10, 2006 6:39 pm
Posts: 1143
Location: Czech Republic
That is great. ;)

_________________
- Phoca Gallery - simple image gallery with slideshow - http://www.phoca.cz/phocagallery/
- Phoca Restaurant Menu - http://www.phoca.cz/restaurantmenudemo/


Top
 Profile  
 
PostPosted: Sat Feb 10, 2007 6:51 pm 
User avatar
Joomla! Master
Joomla! Master

Joined: Fri Aug 12, 2005 3:47 pm
Posts: 17321
Location: **Translation Matters**
Last question:

Have you tried the last releases of Unicode GPL fonts (december 2006):
http://download.savannah.gnu.org/releases/freefont/

I am asking because David did the job before these were released.

_________________
Jean-Marie Simonet / infograf · http://www.info-graf.fr
Multilanguage in 2.5: http://help.joomla.org/files/EN-GB_multilang_tutorial.pdf
---------------------------------
Joomla Translation Coordination Team • Joomla! Production Working Group


Top
 Profile  
 
PostPosted: Sat Feb 10, 2007 7:45 pm 
User avatar
Joomla! Ace
Joomla! Ace

Joined: Sun Dec 10, 2006 6:39 pm
Posts: 1143
Location: Czech Republic
Now I have tried it. The outcome is the same because there isn't problem in ttf (font) but in the ttf2ufm.exe.
ttf2ufm.exe creates ufm file with error.

_________________
- Phoca Gallery - simple image gallery with slideshow - http://www.phoca.cz/phocagallery/
- Phoca Restaurant Menu - http://www.phoca.cz/restaurantmenudemo/


Top
 Profile  
 
PostPosted: Sun Feb 11, 2007 8:10 am 
User avatar
Joomla! Master
Joomla! Master

Joined: Fri Aug 12, 2005 3:47 pm
Posts: 17321
Location: **Translation Matters**
I may have good News for you all.
tcpdf library has been updated last night and we also get a new font package.
I tested the Ċ and č and it looks like working.

Please install last SVN (6576+) and download these new fonts

http://forge.joomla.org/sf/frs/do/downl ... s8747?dl=1

Waiting for your feedback

_________________
Jean-Marie Simonet / infograf · http://www.info-graf.fr
Multilanguage in 2.5: http://help.joomla.org/files/EN-GB_multilang_tutorial.pdf
---------------------------------
Joomla Translation Coordination Team • Joomla! Production Working Group


Top
 Profile  
 
PostPosted: Sun Feb 11, 2007 1:17 pm 
User avatar
Joomla! Ace
Joomla! Ace

Joined: Sun Dec 10, 2006 6:39 pm
Posts: 1143
Location: Czech Republic
Jean-Marie, m'incliner devant toi.

It works great! The following code in tcpdf class is the solution:
Code:
function _escape($s)
{
     // the chr(13) substitution fixes the Bugs item #1421290.
     return strtr($s, array(')' => '\\)', '(' => '\\(', '\\' => '\\\\', chr(13) => '\r'));   
}


Thank you very much.

_________________
- Phoca Gallery - simple image gallery with slideshow - http://www.phoca.cz/phocagallery/
- Phoca Restaurant Menu - http://www.phoca.cz/restaurantmenudemo/


Top
 Profile  
 
PostPosted: Sun Feb 11, 2007 2:13 pm 
User avatar
Joomla! Master
Joomla! Master

Joined: Fri Aug 12, 2005 3:47 pm
Posts: 17321
Location: **Translation Matters**
All the merit goes to Louis Landry...
I happened to bug him about this as he was just committing the new library, explaining what was our problem.
I tested on the fly, that's all.  :D

_________________
Jean-Marie Simonet / infograf · http://www.info-graf.fr
Multilanguage in 2.5: http://help.joomla.org/files/EN-GB_multilang_tutorial.pdf
---------------------------------
Joomla Translation Coordination Team • Joomla! Production Working Group


Top
 Profile  
 
PostPosted: Sun Feb 11, 2007 4:28 pm 
User avatar
Joomla! Ace
Joomla! Ace

Joined: Sun Dec 10, 2006 6:39 pm
Posts: 1143
Location: Czech Republic
I don't thank you for the solution (thanks to Louis Landry), I thank you for the output.  :)

_________________
- Phoca Gallery - simple image gallery with slideshow - http://www.phoca.cz/phocagallery/
- Phoca Restaurant Menu - http://www.phoca.cz/restaurantmenudemo/


Top
 Profile  
 
PostPosted: Sun Feb 11, 2007 4:52 pm 
User avatar
Joomla! Master
Joomla! Master

Joined: Fri Aug 12, 2005 3:47 pm
Posts: 17321
Location: **Translation Matters**
inglia wrote:
Jean-Marie, I've read those threads several times and it looks to me that included Vera font should work for latin2 range of languages. Am I wrong about this?


I have not tested Vera fully, Inglia, but Vera  for sure does not display the Ċ

_________________
Jean-Marie Simonet / infograf · http://www.info-graf.fr
Multilanguage in 2.5: http://help.joomla.org/files/EN-GB_multilang_tutorial.pdf
---------------------------------
Joomla Translation Coordination Team • Joomla! Production Working Group


Top
 Profile  
 
PostPosted: Sun Feb 11, 2007 5:36 pm 
Joomla! Explorer
Joomla! Explorer

Joined: Thu Aug 18, 2005 1:47 pm
Posts: 266
It's not important any more, Vera was just confusing because it has all the glyphs (for hr) but not all of them are represented with both lowercase and uppercase variant.

Thank you, all 3 of you, for the solution  :)

_________________
Please read the Forum rules regarding signatures: viewtopic.php?t=65


Top
 Profile  
 
PostPosted: Thu Jun 21, 2007 4:07 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Thu Jun 21, 2007 3:21 pm
Posts: 2
Hi to everyone in this forum.
I'm working with tcpdf and the pdf files that we create are about 240K, The pdf files come with Unicode support for Latin 2 characters. My question is how can we make the files smaller.


Top
 Profile  
 
PostPosted: Thu Jun 21, 2007 7:23 pm 
User avatar
Joomla! Ace
Joomla! Ace

Joined: Sun Dec 10, 2006 6:39 pm
Posts: 1143
Location: Czech Republic
I have the same problem. I think, PDF document saves all utf-8 characters in font, because if I create PDF with e.g. Vera fonts, it takes 70 KB but without characters I need.

_________________
- Phoca Gallery - simple image gallery with slideshow - http://www.phoca.cz/phocagallery/
- Phoca Restaurant Menu - http://www.phoca.cz/restaurantmenudemo/


Top
 Profile  
 
PostPosted: Fri Jun 22, 2007 8:39 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Thu Jun 21, 2007 3:21 pm
Posts: 2
In FPDF also the father of TCPDF it is possible too convert fonts with different encodings and only the subsets for the needed languages. the unneeded chars in map files can be deleted. The font files are therefore smaller and smaller PDF files can be created.

Does anyone have an idea if the same can be achieved with tcpdf? I tried to convert fonts with subsets, the converted font files were as big as normal converted fonts.


Top
 Profile  
 
PostPosted: Sun Aug 05, 2007 3:44 pm 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Sun Jul 29, 2007 11:26 am
Posts: 46
Location: Warszawa
H13: Considering that your conversation about PDF fonts generating for central eu languages took place in march, i assume that fix was already implemented in RC1. I found the same problem with polish language. Instead of ¶æñ¼¿± etc. I have squares in PDF. Do you have any solution for that already or I need to wait for full polish translation project finish?


Top
 Profile  
 
PostPosted: Sun Aug 05, 2007 4:04 pm 
User avatar
Joomla! Ace
Joomla! Ace

Joined: Sun Dec 10, 2006 6:39 pm
Posts: 1143
Location: Czech Republic
Pajonkhfat,

Try to change font, because Vera (default PDF font for Joomla!1.5) doesn't support central European languages (Latin2). Now I use FreeSans and I have no problems with PDF creating. I think, FreeSans contains polish characters too.

_________________
- Phoca Gallery - simple image gallery with slideshow - http://www.phoca.cz/phocagallery/
- Phoca Restaurant Menu - http://www.phoca.cz/restaurantmenudemo/


Top
 Profile  
 
PostPosted: Wed Aug 08, 2007 8:38 am 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Sun Jul 29, 2007 11:26 am
Posts: 46
Location: Warszawa
H13 wrote:
Pajonkhfat,

Try to change font, because Vera (default PDF font for Joomla!1.5) doesn't support central European languages (Latin2). Now I use FreeSans and I have no problems with PDF creating. I think, FreeSans contains polish characters too.


Thanks for help. I've got freesans.php, freesans.ctg.z, freesansbold.z and freesansbold.ctg.z in my joomla/language/pdf_fonts/ directory. One more thing. How I can force joomla fpdf to use freesans instead of vera fonts? ??? I could rename it to vera and overwrite old vera files, but it does not seems to be the best way for me :)


Top
 Profile  
 
PostPosted: Wed Aug 08, 2007 9:59 am 
User avatar
Joomla! Master
Joomla! Master

Joined: Thu Aug 18, 2005 9:58 am
Posts: 10119
Location: Hillerød - Denmark
Hi pajonkhfat,

Try change the folllowing in your site language pl-PL.xml
vera
to
freesans

_________________
Ole Bang Ottosen
redCOMPONENT Community Manager http://redcomponent.com
Personligt site www.ot2sen.dk
Dansk Joomla! support websted - joomla.dk


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 55 posts ]  Go to page 1, 2  Next



Who is online

Users browsing this forum: No registered users and 28 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group