Error in name of Ursa Major constellation

Asked by Giorgio

In Stellarium 0.10.5 (SVN r6364) the name of "Ursa Major" appear "Ursa Ma or" (without j).
Is a problem of my computer or a programming error?

Question information

Language:
English Edit question
Status:
Solved
For:
Stellarium Edit question
Assignee:
No assignee Edit question
Solved by:
pedemoz
Solved:
Last query:
Last reply:
Revision history for this message
Matthew Gates (matthew-porpoisehead) said :
#1

Please provide more information about your system... OS, OS version, locale settings... preferably attach the logfile (in <User Data Directory>... you can find where this is for you OS by looking at this link: http://www.stellarium.org/doc/head/fileStructure.html

Can you also make a screenshot of the problem and attach it? Thanks.

Revision history for this message
Matthew Gates (matthew-porpoisehead) said :
#2

oops, that's not an anwer... setting status to "needs information"

Revision history for this message
Bogdan Marinov (daggerstab) said :
#3

Well, as the only way to get "Stellarium 0.10.5 (SVN r6364)" without compiling from source is to download one of my test builds, I guess that Giorgio runs some kind of Windows. :)

I can confirm that this happens - running that build with Wine on Ubuntu shows the same problem. The "j" is missing in Canis Major too, and in the location name in the toolbar, if the location name contains a "j" normally.

As both Ursa Major and Canis Major are found normally with the Find window, and location names containing "j" can be selected in the Location window, I guess that the reason is related to font display with Qt/OpenGL. It may be a packaging problem - some byte has gone bad and the "j" glyph can't be rendered. I'll check the previous builds for the same problem and I'll be aware of it when I package the next test build.

Revision history for this message
Bogdan Marinov (daggerstab) said :
#4

I think I've found it. It seems that there is a problem with drawing "j" with OpenGL if the font size is set to 13 (and lower?).

Default constellation label size was reduced from 16 to 13 in revision 6219. I don't know why, someone should ask Fabien.

The font size of the location field in the bottom toolbar has been set to 12 for some time now.

Giorgio, I'd like to know your graphics card's model in case that this issue is device specific. Mine is an Intel (on-board?) card.

Revision history for this message
Giorgio (giorpass) said :
#5

Hi Matthew and Bodgan,

I'm giving you specs:
Model: DELL Latitude D510
Ty
Processor Type: Intel Pentium M Processor 740 (1,73 Ghz)
Processor Features: 2MB L2 cache, 533 MHz front side bus, clock speed 1.73 GHz
O.S.: Microsoft Windows XP Pro – ver. 5.1.2600 SP2 –Build 2600
Graphics: Integrated Intel Graphics Media Accelerator 900
Chipset: Intel® 915GM/GMS,910GML Express Chipset
DAC: Internal – 128 MB
Memory: 504 MB RAM

I hope they will be right. Thanks.

Revision history for this message
pedemoz (pedemoz) said :
#6

Same problem with r6384 using a nvidia GeForce GO 6800 on Win XP. However, this is only when using OpenGL1 - no problem with (the default) OpenGL2. (I am also noticing some other font problems under OpenGL1, whereas before all my problems were with OpenGL2...)

Giorgio - Can you confirm if you are running OpenGL1 or 2? (best to check the Stellarium log at 'C:\Documents and Settings\{user name}\Application Data\Stellarium\log.txt' and look for the line "Qt GL paint engine is:")

Revision history for this message
Giorgio (giorpass) said :
#7

This one:

Qt GL paint engine is: "OpenGL"

Revision history for this message
Best pedemoz (pedemoz) said :
#8

That is OpenGL1 (the same as I can reproduce the problem with). Have you explicitly set it to use that? (it should use OpenGL2 by default, unless it is not supported by your graphics card/driver - someone else may help with that) Unless you need GL1, running GL2 should fix the problem (just ask if you need help doing this).

@DEVS

The problem is with the default DejaVu Sans font not rendering correctly at a pixel height of 13 (12, 14 and many other values are okay for me). Solutions include:

1/ Use the Verdana font on Windows (which DejaVu is based on(?) and is included with Windows). The following simple patch works, but isn't perfect as the font could be set elsewhere...

Index: src/main.cpp
===================================================================
--- src/main.cpp (revision 6392)
+++ src/main.cpp (working copy)
@@ -294,7 +294,11 @@

        // Set the default application font and font size.
        // Note that style sheet will possibly override this setting.
+#ifdef Q_OS_WIN
+ QFont tmpFont("Verdana");
+#else
        QFont tmpFont("DejaVu Sans");
+#endif
        tmpFont.setPixelSize(13);
        QApplication::setFont(tmpFont);
 #endif

2/ Don't use a pixel height of 13! Use 12, 14 or something else. (Setting 'viewing/constellation_font_size' in the config file is the fastest way to test different sizes, although it is only for the constellation labels. To me, a size of 14 or 15 is best as the anti-aliasing is poor - see below.)

3/ The text does not appear to be anti-aliasing very well (at all?) under OpenGL1; the same font is much smoother under OpenGL2. If anti-aliasing is not configured properly for OpenGL1 then options 1 or 2 above may not be required if that can be fixed. (Surely anti-aliasing is supported under OpenGL1?)

PS This should be a bug report, not a Q&A.

Revision history for this message
Fabien Chéreau (xalioth) said :
#9

Hi, thanks pedemoz for your inputs. I just committed a modified version of your #ifdef Q_OS_WIN patch, which hides the problem..
The whole thing is quite ugly but well...

I am quite curious to know if this has any impact on the other font display problems.
Fabien

Revision history for this message
faluco (borja-ferav) said :
#10

I wouldnt ifdef and hardcode the font type depending on the OS used, instead, what i would do is use verdana or whatever only if opengl1 is used, otherwise leave dejavusans since it works fine in opengl2.

Revision history for this message
Fabien Chéreau (xalioth) said :
#11

Faluco, yes it's exactly what I just committed.

Revision history for this message
faluco (borja-ferav) said :
#12

Oh sorry, you commited the patch while i was writing my comment, thats why i didnt see it :)

Revision history for this message
pedemoz (pedemoz) said :
#13

Ugly, yes... But some quick research suggests there may be a Qt bug so, "at least it's fixed." (Has anyone tried to reproduce on Linux?)

Given that other font problems were with OpenGL2, this patch won't help (and you thought you were very clever adding a check to limit the change to OpenGL1 ;) I will test the font change re the font corruption problems, but as per an earlier post I can't reproduce the problems since installing Qt, etc. About the only time I've NOT wanted a problem to go away! If someone else can reproduce the font corruption then perhaps they can try changing fonts. Otherwise I may get a chance to try a clean install on the weekend.

Speaking of fonts, there are two config file settings not being used:
gui/base_font_name
gui/base_font_size

These should be used as per the constellation labels (such as my patch used for testing - another one that won't win any beauty contests...) I'll leave you to implement it in the proper spot for main.cpp:

Index: src/core/modules/ConstellationMgr.cpp
===================================================================
--- src/core/modules/ConstellationMgr.cpp (revision 6393)
+++ src/core/modules/ConstellationMgr.cpp (working copy)
@@ -79,6 +79,11 @@
  Q_ASSERT(conf);

  lastLoadedSkyCulture = "dummy";
+#ifdef Q_OS_WIN
+ asterFont.setFamily(conf->value("viewing/flag_constellation_font_name","Verdana").toString());
+#else
+ asterFont.setFamily(conf->value("viewing/flag_constellation_font_name").toString());
+#endif
  asterFont.setPixelSize(conf->value("viewing/constellation_font_size",13).toInt());
  setFlagLines(conf->value("viewing/flag_constellation_drawing").toBool());
  setFlagLabels(conf->value("viewing/flag_constellation_name").toBool());

Revision history for this message
pedemoz (pedemoz) said :
#14

Giorgio,

If you got a bit lost with all the posts, here is a summary of possible solutions:
a/ Use OpenGL2 (see earlier posts or ask for help).
b/ Build from the latest source code (a fix has been created and is in the svn repo).
c/ Wait for and install version 0.10.5 (which will be available soon).

Given that this bug probably does not affect your use of Stellarium, you may opt to do none of the above. In that case, I'm sure the devs are appreciative of your highlighting this bug.

Thanks.

Revision history for this message
Giorgio (giorpass) said :
#15

Thank's to all.
I solved problem.

Revision history for this message
Giorgio (giorpass) said :
#16

Thanks pedemoz, that solved my question.

Revision history for this message
Giorgio (giorpass) said :
#17

SVN r6428 solved my question.