[UTF-8] Simboli e FidoCadJ

Messaggioda DarwinNE » 14/09/2014, 17:01

Ciao a tutti,
mi sono reso conto che c'è un problemino durante la conversione delle immagini in formato FidoCadJ qui sul forum. Le lettere greche non vengono rappresentate correttamente:



Così invece è come appare durante l'editing:

Immagine

Quando il rendering è fatto da FidoCadJ che gira sul server di Matematicamente, manca la lettera \(\displaystyle \theta \) che dovrebbe apparire per indicare l'angolo.
FidoCadJ adotta in ogni situazione la codifica UTF-8 e credo sia lo stesso per il motore del forum, però è probabile che da qualche parte fra il momento in cui il disegno viene incollato in un messaggio ed il momento in cui viene spedito a FidoCadJ sul server, l'informazione sulla codifica viene perduta.

Qualche tempo fa, c'erano stati dei problemi simili anche su ElectroYou, ma poi si era riusciti a correggerli:
http://www.electroyou.it/forum/viewtopi ... 10#p248684
Avatar utente
DarwinNE
New Member
New Member
 
Messaggio: 26 di 82
Iscritto il: 07/09/2012, 20:11
Località: Grenoble - France

Re: [UTF-8] Simboli e FidoCadJ

Messaggioda anonymous_be1147 » 15/09/2014, 23:53

Ciao, grazie della segnalazione. Purtroppo non sembra essere un problema di codifica, perché anche eseguendo da terminale, come suggerito su ElectroYou, il comando:

Codice:
env LANG=it_IT.utf8 java -jar fidocadj.jar -n -c r3 png 6ad059381ff0752fb27154ab6785165e.png 6ad059381ff0752fb27154ab6785165e.fcd

si ottiene lo stesso risultato senza carattere \(\theta\).

Considerato però che altri caratteri come le accentate vengono invece rese correttamente

lettera con accento acuto

lettera con accento acuto

potrebbe secondo me essere che il/la font usato/a sul nostro server sia "incompleto/a" e non abbia i caratteri greci. Se trovo un attimo di tempo provo a investigare meglio il problema. Si accettano ovviamente consigli/suggerimenti/soluzioni. :)
anonymous_be1147
Cannot live without
Cannot live without
 
Messaggio: 1217 di 3226
Iscritto il: 02/03/2006, 20:20

Re: [UTF-8] Simboli e FidoCadJ

Messaggioda DarwinNE » 16/09/2014, 16:50

In effetti, il font potrebbe essere all'origine del problema.

Faccio una prova con un po' di simboli.

prova simboli utf-8

prova simboli utf-8


Che font ci sono installati adesso sul server? Sono i Liberation?
Avatar utente
DarwinNE
New Member
New Member
 
Messaggio: 27 di 82
Iscritto il: 07/09/2012, 20:11
Località: Grenoble - France

Re: [UTF-8] Simboli e FidoCadJ

Messaggioda anonymous_be1147 » 16/09/2014, 21:54

Il comando fc-list dà

Codice:
Bitstream Charter:style=Bold
Bitstream Charter:style=Bold Italic
Bitstream Charter:style=Italic
Bitstream Charter:style=Regular
Century Schoolbook L:style=Bold
Century Schoolbook L:style=Bold Italic
Century Schoolbook L:style=Italic
Century Schoolbook L:style=Roman
Dingbats:style=Regular
Hershey\-Gothic\-English:style=Regular
Hershey\-Gothic\-German:style=Regular
Hershey\-Gothic\-Italian:style=Regular
Hershey\-Plain\-Duplex:style=Regular
Hershey\-Plain\-Duplex\-Italic:style=Regular
Hershey\-Plain\-Triplex:style=Regular
Hershey\-Plain\-Triplex\-Italic:style=Regular
Hershey\-Script\-Complex:style=Regular
Hershey\-Script\-Simplex:style=Regular
Nimbus Mono L:style=Bold
Nimbus Mono L:style=Bold Oblique
Nimbus Mono L:style=Regular
Nimbus Mono L:style=Regular Oblique
Nimbus Roman No9 L:style=Medium
Nimbus Roman No9 L:style=Medium Italic
Nimbus Roman No9 L:style=Regular
Nimbus Roman No9 L:style=Regular Italic
Nimbus Sans L:style=Bold
Nimbus Sans L:style=Bold Condensed
Nimbus Sans L:style=Bold Condensed Italic
Nimbus Sans L:style=Bold Italic
Nimbus Sans L:style=Regular
Nimbus Sans L:style=Regular Condensed
Nimbus Sans L:style=Regular Condensed Italic
Nimbus Sans L:style=Regular Italic
Standard Symbols L:style=Regular
URW Bookman L:style=Demi Bold
URW Bookman L:style=Demi Bold Italic
URW Bookman L:style=Light
URW Bookman L:style=Light Italic
URW Chancery L:style=Medium Italic
URW Gothic L:style=Book
URW Gothic L:style=Book Oblique
URW Gothic L:style=Demi
URW Gothic L:style=Demi Oblique
URW Palladio L:style=Bold
URW Palladio L:style=Bold Italic
URW Palladio L:style=Italic
URW Palladio L:style=Roman
Utopia:style=Bold
Utopia:style=Bold Italic
Utopia:style=Italic
Utopia:style=Regular

Io proverei a installare i DejaVu, perché dando un'occhiata ai file fontconfig nella root del JRE è l'unico che riconosco e che ho installato anche sul mio sistema. Tu quale consigli?
anonymous_be1147
Cannot live without
Cannot live without
 
Messaggio: 1218 di 3226
Iscritto il: 02/03/2006, 20:20

Re: [UTF-8] Simboli e FidoCadJ

Messaggioda anonymous_be1147 » 17/09/2014, 21:10

Mi rispondo da solo :)

Sì, mancava il font giusto, con i DejaVu funziona:

esempio con il carattere theta u+03b8

esempio con il carattere theta u+03b8
anonymous_be1147
Cannot live without
Cannot live without
 
Messaggio: 1219 di 3226
Iscritto il: 02/03/2006, 20:20

Re: [UTF-8] Simboli e FidoCadJ

Messaggioda DarwinNE » 19/09/2014, 16:07

Spettacolo!!! :smt023

Che occhio che hai avuto con i font... io avrei perso un sacco di tempo con l'UTF-8!

Proviamo:




Edit: però Helvetica viene mappato su un font con serif...
Avatar utente
DarwinNE
New Member
New Member
 
Messaggio: 28 di 82
Iscritto il: 07/09/2012, 20:11
Località: Grenoble - France

Re: [UTF-8] Simboli e FidoCadJ

Messaggioda anonymous_be1147 » 20/09/2014, 00:45

Hai ragione. Da quello che ho capito Java per selezionare i font si basa su un file fontconfig.properties appropriato. Nel nostro caso i percorsi ai font nel suddetto file non combaciavano con quelli reali, quindi Java ripiegava sulla configurazione della libreria fontconfig. Dopo aver corretto i percorsi è ora possibile usare i 5 font logici sempre disponibili.

Sembra tuttavia che FidoCadJ (Java?) non riesca a usare/selezionare gli altri font installati sul sistema se il nome contiene degli spazi (sostituiti con un simbolo + come specificato nella doc.). Esempio:



Come si vede i *+SANS sono resi con il sanserif generico... :?
anonymous_be1147
Cannot live without
Cannot live without
 
Messaggio: 1221 di 3226
Iscritto il: 02/03/2006, 20:20

Re: [UTF-8] Simboli e FidoCadJ

Messaggioda DarwinNE » 20/09/2014, 10:07

Ottimo!

Gli spazi sono sostituiti non con "+", ma con "++", c'è un errore nella documentazione? :oops:



Comunque, è molto utile sapere esattamente i font installati qui sul forum perché così se si ricerca un rendering preciso del testo si sa come procedere!
Avatar utente
DarwinNE
New Member
New Member
 
Messaggio: 29 di 82
Iscritto il: 07/09/2012, 20:11
Località: Grenoble - France

Re: [UTF-8] Simboli e FidoCadJ

Messaggioda anonymous_be1147 » 21/09/2014, 23:37

DarwinNE ha scritto:Gli spazi sono sostituiti non con "+", ma con "++", c'è un errore nella documentazione? :oops:

Sembrerebbe di sì, a pagina 36 del manuale si legge:
If the font name contains spaces these must be replaced with the symbol +.


DarwinNE ha scritto:Comunque, è molto utile sapere esattamente i font installati qui sul forum perché così se si ricerca un rendering preciso del testo si sa come procedere!

L'elenco completo è questo:

Codice:
Bitstream Charter:style=Bold
Bitstream Charter:style=Bold Italic
Bitstream Charter:style=Italic
Bitstream Charter:style=Regular
Century Schoolbook L:style=Bold
Century Schoolbook L:style=Bold Italic
Century Schoolbook L:style=Italic
Century Schoolbook L:style=Roman
DejaVu Sans Mono:style=Bold
DejaVu Sans Mono:style=Bold Oblique
DejaVu Sans Mono:style=Book
DejaVu Sans Mono:style=Oblique
DejaVu Sans,DejaVu Sans Condensed:style=Condensed Bold Oblique,Bold Oblique
DejaVu Sans,DejaVu Sans Condensed:style=Condensed Bold,Bold
DejaVu Sans,DejaVu Sans Condensed:style=Condensed Oblique,Oblique
DejaVu Sans,DejaVu Sans Condensed:style=Condensed,Book
DejaVu Sans,DejaVu Sans Light:style=ExtraLight
DejaVu Sans:style=Bold
DejaVu Sans:style=Bold Oblique
DejaVu Sans:style=Book
DejaVu Sans:style=Oblique
DejaVu Serif,DejaVu Serif Condensed:style=Condensed Bold Italic,Bold Italic
DejaVu Serif,DejaVu Serif Condensed:style=Condensed Bold,Bold
DejaVu Serif,DejaVu Serif Condensed:style=Condensed Italic,Italic
DejaVu Serif,DejaVu Serif Condensed:style=Condensed,Book
DejaVu Serif:style=Bold
DejaVu Serif:style=Bold Italic
DejaVu Serif:style=Book
DejaVu Serif:style=Italic
Dingbats:style=Regular
Hershey\-Gothic\-English:style=Regular
Hershey\-Gothic\-German:style=Regular
Hershey\-Gothic\-Italian:style=Regular
Hershey\-Plain\-Duplex:style=Regular
Hershey\-Plain\-Duplex\-Italic:style=Regular
Hershey\-Plain\-Triplex:style=Regular
Hershey\-Plain\-Triplex\-Italic:style=Regular
Hershey\-Script\-Complex:style=Regular
Hershey\-Script\-Simplex:style=Regular
Nimbus Mono L:style=Bold
Nimbus Mono L:style=Bold Oblique
Nimbus Mono L:style=Regular
Nimbus Mono L:style=Regular Oblique
Nimbus Roman No9 L:style=Medium
Nimbus Roman No9 L:style=Medium Italic
Nimbus Roman No9 L:style=Regular
Nimbus Roman No9 L:style=Regular Italic
Nimbus Sans L:style=Bold
Nimbus Sans L:style=Bold Condensed
Nimbus Sans L:style=Bold Condensed Italic
Nimbus Sans L:style=Bold Italic
Nimbus Sans L:style=Regular
Nimbus Sans L:style=Regular Condensed
Nimbus Sans L:style=Regular Condensed Italic
Nimbus Sans L:style=Regular Italic
Standard Symbols L:style=Regular
URW Bookman L:style=Demi Bold
URW Bookman L:style=Demi Bold Italic
URW Bookman L:style=Light
URW Bookman L:style=Light Italic
URW Chancery L:style=Medium Italic
URW Gothic L:style=Book
URW Gothic L:style=Book Oblique
URW Gothic L:style=Demi
URW Gothic L:style=Demi Oblique
URW Palladio L:style=Bold
URW Palladio L:style=Bold Italic
URW Palladio L:style=Italic
URW Palladio L:style=Roman
Utopia:style=Bold
Utopia:style=Bold Italic
Utopia:style=Italic
Utopia:style=Regular

ma se servono possiamo installarne altri.
anonymous_be1147
Cannot live without
Cannot live without
 
Messaggio: 1222 di 3226
Iscritto il: 02/03/2006, 20:20

Re: [UTF-8] Simboli e FidoCadJ

Messaggioda DarwinNE » 22/09/2014, 00:21

Ho corretto il refuso nel manuale in inglese (perlomeno, nella versione nel repository). Purtroppo, ogni tanto scappano le castronerie :oops:

Se trovi altre stupidaggini, io sono sempre tutt'orecchi. :smt023
Avatar utente
DarwinNE
New Member
New Member
 
Messaggio: 30 di 82
Iscritto il: 07/09/2012, 20:11
Località: Grenoble - France


Torna a Questioni tecniche del Forum (NON di matematica)

Chi c’è in linea

Visitano il forum: Nessuno e 1 ospite