You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openoffice.apache.org by Matthieu Riolo <ma...@adfinis-sygroup.ch> on 2014/01/14 17:34:59 UTC

Wrong Fontname in word files

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello everyone

A customer of me is using AOO3.4.1 on Solaris. The Writer seems to
have a problem, when it reads in doc file that has a longer fontname
than 12/13 characters. In that case the name will have chinese letters
at the end, examples:

Times New Rom愀渀
Bookman Old S琀礀氀攀
Courier 10 Pi琀挀栀

The problem only happens when opening a doc file and only on solaris.
The same OO version on linux is working fine with the file. The fonts
are installed on the machine (they are also available in the writer).
If this problem occurs the writer simply uses the default font.


I somehow expect the problem to be a memory-overlap problem. Kinda
hard to explain in words, but I could think of the following problem:

typedef struct font {
	char name[12];
	int length;
};

font f;
for(int i = 0; 1 ; i++) {
	char c = filestream.getChar();
	if(c != \0) {
		f.name[i] = c;
		//this could write into the "length" field of the struct
	}else
		break;
}
f.length = (i <= 12 ? i : 12); //this will overwrite the characters
that are in the "length" field

My main problem is that I don't know the OO code that well. I would be
really glad, if someone could give me an advice where to find the "MS
Reader for Fonts" (or even better, all locations of the MS-stuff). If
there are any other advices why this fontname problem occurs, you're
very welcome to tell me.

Kind Regards, Matthieu Riolo


PS: The file has been created/edited with OO
PPS: I have not created a ticket for this bug


- -- 
Adfinis SyGroup AG
Matthieu Riolo, Lehrling Applikationsentwickler

Keltenstrasse 98 | CH-3018 Bern
Tel. 031 550 31 11
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.14 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJS1WcyAAoJEN4lbfBODG2LWZsH/iEsMjgtSo8xtdLGvX8FnG5I
l+kuiDvNmmDu6PEHveOvuT6DtDQxXpTkQ8YocCSNMOoazW7YAWcZjPeG7eWcm57k
sJithQ5mg4aModKQ3EqTPltblyKKQTOH9JaiLKSv/rfYyemC5Z9++qy69QxSOS/J
4FsZcPCbTd+N2VyGlU0jNF7zuzVwOSW/PE06oBHXvqzR4O9Xunkxr7KEXIT2KHAQ
9L5+WXGSgWTwFm3Vt2BRuAbWmhwzu7ghdfCLMWuEw0QCxRi1dg6lrkvWgWffX41v
nhCrWfDtjpqn0HpLfS0Er8rS9SVg9Unl2L3jrwaHZ4qTa7AvLO7Jtc8YvaJi6O4=
=aDFo
-----END PGP SIGNATURE-----


Re: Wrong Fontname in word files

Posted by Matthieu Riolo <ma...@adfinis-sygroup.ch>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello

The first mail contained an attachement but for some reason it is not
available in the mailinglist. I uploaded the example file:
https://adfinis-sygroup.ch/file-exchange-public/OOO341-issues/FontDoc.doc

Best Regards, Matthieu Riolo


Am 14.01.2014 17:34, schrieb Matthieu Riolo:
> Hello everyone
> 
> A customer of me is using AOO3.4.1 on Solaris. The Writer seems to 
> have a problem, when it reads in doc file that has a longer
> fontname than 12/13 characters. In that case the name will have
> chinese letters at the end, examples:
> 
> Times New Rom?? Bookman Old S???? Courier 10 Pi???
> 
> The problem only happens when opening a doc file and only on
> solaris. The same OO version on linux is working fine with the
> file. The fonts are installed on the machine (they are also
> available in the writer). If this problem occurs the writer simply
> uses the default font.
> 
> 
> I somehow expect the problem to be a memory-overlap problem. Kinda 
> hard to explain in words, but I could think of the following
> problem:
> 
> typedef struct font { char name[12]; int length; };
> 
> font f; for(int i = 0; 1 ; i++) { char c = filestream.getChar(); 
> if(c != \0) { f.name[i] = c; //this could write into the "length"
> field of the struct }else break; } f.length = (i <= 12 ? i : 12);
> //this will overwrite the characters that are in the "length"
> field
> 
> My main problem is that I don't know the OO code that well. I would
> be really glad, if someone could give me an advice where to find
> the "MS Reader for Fonts" (or even better, all locations of the
> MS-stuff). If there are any other advices why this fontname problem
> occurs, you're very welcome to tell me.
> 
> Kind Regards, Matthieu Riolo
> 
> 
> PS: The file has been created/edited with OO PPS: I have not
> created a ticket for this bug
> 
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
>
> 
To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
> For additional commands, e-mail: dev-help@openoffice.apache.org
> 

- -- 
Adfinis SyGroup AG
Matthieu Riolo, Lehrling Applikationsentwickler

Keltenstrasse 98 | CH-3018 Bern
Tel. 031 550 31 11
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.14 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJS1+k2AAoJEN4lbfBODG2LcDkIALybVXpUsmJxl7QcxoHTA8jJ
xXkD2S6XQDI4xKUCjR1epl/bXpxYkiAY/jkz2rnh1LSk89ILEUmXPQrlZZ6H/9fb
Rij6THNN6hKR8kpMDfV4eS2Rc6miWzKKIHaVDJ3Gc1cntAJP+pmbbk1KnYX5Tw0n
N8uvFbUMw1nz1/DLe/9tqJBqOIXDDVys7XIkoPDvvecADaGTEctG1vnbRJCCyLKC
TTEP9zxQSLR/YO562hF32p4Zpxq/LHUpkN2kJIUThrvTiWsc/iYRadkRqwB+AqbG
MfyAMi+jzaZm8j/V7PDqubTgn6n6LV9IsYa3TWMGRXLN64RPX5KYo0nmoeQrS/8=
=tiUK
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
For additional commands, e-mail: dev-help@openoffice.apache.org