Page 1 of 1

Problem with text spacing before or after tags

PostPosted: Tue May 17, 2011 9:53 am
by betwee
Hi,

I did a clean install of Ubuntu 10.04.2 and I'm using GoldenDict 1.0.1-27 from git. Before I was using Ubuntu 11.04 and didn't have this problem, so it may have something to do with special libraries I should use or maybe a font problem (I have all the dependencies GoldenDict needs, however). As you can see from the picture, the tags in italics in the first definition (kund.) have an unusual space before them. This happens with other tags, too. If I maximize the window the space becomes larger.

?

Image

Re: Problem with text spacing before or after tags

PostPosted: Wed May 18, 2011 6:09 am
by ikm
So there are some large spaces in some unknown dictionary in unknown format. Can't suggest much, really. Try saving as HTML, opening in a browser and seeing if the spaces would still be there.

Re: Problem with text spacing before or after tags

PostPosted: Wed May 18, 2011 9:15 am
by betwee
well ikm,

The first dictionary is in Albanian and the format used is DSL. I have had no issues using it in Windows or Ubuntu 10.10/11.04 (I didn't notice any large spaces there), and it looks fine when saved in HTML and viewed in a browser. This is the code for that special definition:

Code: Select all
special
   [p]mb.[/p]
   [m1][b]1.[/b] Që dallohet për diçka të jashtëzakonshme, i veçantë; [i]kund.[/i] [b]i zakonshëm[/b]. [ex]Në kushte speciale.[/ex]
   [b]2.[/b] Që është i caktuar a që bëhet posaçërisht për dikë a për diçka, i posaçëm; [i]kund.[/i] [b]i zakonshëm[/b]. [ex]Repart special. Makinë (enë) speciale. I dërguar (korrespondent) special.[/ex]
   [b]3.[/b] Që lidhet me një degë të veçantë e të ngushtë të shkencës a të teknikës; [i]kund.[/i] [b]i përgjithshëm[/b]. [ex]Term special. Lëndë speciale. Studime speciale.[/ex]
   [b]4.[/b] Që është i një cilësie të veçantë, më të lartë se të tjerët; që bën punë të një cilësie të veçantë a nxjerr nga duart sende me cilësi më të lartë se të tjerët. [ex]Duhan special. Rrobaqepësi speciale.[/ex][/m]

Re: Problem with text spacing before or after tags

PostPosted: Fri Jun 10, 2011 7:05 pm
by betwee
Here is the above dictionary, http://www.mediafire.com/?cmc2d17crn2ai2n . You can have a look at the format used and maybe tell if there is anything wrong with it and what should be changed to suit GoldenDict and Lingvo in general. I am also starting to think this might be a font issue, so if I could change the global font used in GoldenDict...

Re: Problem with text spacing before or after tags

PostPosted: Fri Jun 10, 2011 8:13 pm
by Tvangeste
I can reproduce the problem on Ubuntu with the latest GoldenDict as well. Weird spaces here and there. Works great on Windows though... :)

I checked the contents of the DSL file, and there are no hidden symbols in those areas, everything as it should be, so it seems like some kind of rendering bug on Ubuntu. WebKit problem?

Re: Problem with text spacing before or after tags

PostPosted: Sat Jun 11, 2011 7:22 pm
by Tvangeste
betwee, I just upgraded to the latest Ubuntu 11.04, and the problems with spaces inside cards are gone, so it does seem like Qt bug, that was fixed with more recent versions of Qt. Ubuntu 11.04 uses relatively recent 4.7.2.

Re: Problem with text spacing before or after tags

PostPosted: Sat Jun 11, 2011 9:25 pm
by betwee
Tvangeste wrote:betwee, I just upgraded to the latest Ubuntu 11.04, and the problems with spaces inside cards are gone, so it does seem like Qt bug, that was fixed with more recent versions of Qt. Ubuntu 11.04 uses relatively recent 4.7.2.


Thanks for investigating this, :). Yes, as I have said in my first post, I didn't have this problem either (not until installing the most current Ubuntu LTS). I can surely live with it, now that I know what causes it.

Re: Problem with text spacing before or after tags

PostPosted: Sun Jun 12, 2011 7:00 am
by Tvangeste
betwee wrote:Yes, as I have said in my first post, I didn't have this problem either (not until installing the most current Ubuntu LTS)

Man, I *must* read posts more carefully! :)