Indicator widget doesn't display info w/ Ubuntu font

Asked by Patrik B.

I use the full widget. It used to display info using the Ubuntu family font. For some reason some other font is shown and there are no font configuration settings. System settings for fonts are defaults in Ubuntu Unity 14.04.2.

https://img.bi/#/bfaaLNc!PsvehgK_yw8As1aKSwjRUm9wB711NAbngtsgd98N

Question information

Language:
English Edit question
Status:
Answered
For:
my-weather-indicator Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Launchpad Janitor (janitor) said :
#1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
Patrik B. (inoki-deactivatedaccount) said :
#2

An answer to this would be greatly appreciated.

Revision history for this message
Gerhard Großmann (gerhard-grossmann) said :
#3

Hi Patrick,

I’m not connected to this project in any way, but maybe I could help. The font is defined in a textfile for each skin. It can be found in the folder /opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/skins/SKIN_NAME/skin

There are some lines starting with TEXT. In every such line the font family is defined on the fifth position. Example:
TEXT|$PRESSURE$|110|255|Open Sans Light|18|0.8,0.8,0.8,1|LEFT|CENTER
– “Open Sans Light” is the font name.

To make the widget use your own font (e.g. Ubuntu) make a copy of this skin file and save it for example in you home directory. This is the file you will edit. For safety reasons you should make another copy, name it “skin-old” (or the like) and save it at a place where you will find it, when everything went wrong ☺

So, what to do with your copy? Open it in your preferred editor and change the font in every TEXT-line. So
TEXT|$PRESSURE$|110|255|Open Sans Light|18|0.8,0.8,0.8,1|LEFT|CENTER
becomes
TEXT|$PRESSURE$|110|255|Ubuntu|18|0.8,0.8,0.8,1|LEFT|CENTER
and save these changes.

Now you just have to override the existing file. Because you may not have the user rights to override a file in your /opt folder, you could use the terminal for this and copy the following command.

sudo cp PATH_TO_EDITED_FILE /opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/skins/SKIN_NAME

(PATH_TO_EDITED_FILE in this example is your home directory, so it’s “~/skin”;
SKIN_NAME is the name of your skin, e.g. “allinone”, “little” or “superclock”)

Because it’s a sudo command (super user) to get the writing rights you have to type in your Ubuntu password.

To get the new font show up, first chose another skin in the preferences of my-weather-indicator. Apply it, wait for the change and then reset it to your preferred skin. Now your own font should be shown.

Hope this helps. If you still have questions, just ask!

Revision history for this message
Patrik B. (inoki-deactivatedaccount) said :
#4

Thank you for your time, Gerhard.

There has to be some kind of a bug with superclock and the rest of the widgets with the exception of the super widget, which adopts the Ubuntu family font used system-wide naturally.

Too bad there isn't a plug-in that would allow for simpler customization.

Revision history for this message
Gerhard Großmann (gerhard-grossmann) said :
#5

Sorry, Patrick, I don’t know an easier solution.

By the way: The super skin has the Ubuntu font as a default. So it doesn’t adopt your system setting but would keep Ubuntu also if you would change your system font.

Revision history for this message
Patrik B. (inoki-deactivatedaccount) said :
#6

Correct me if I'm wrong, but my-weather-indicator is developed exclusively for the Unity desktop, right? Can't we hence somehow persuade the developers to change the default font to Ubuntu to match the default desktop?

Currently configured fonts don't match the layout of any of the widgets.

Revision history for this message
Gerhard Großmann (gerhard-grossmann) said :
#7

I don’t think defaulting to the Ubuntu font would be the best solution. For example I don’t use Ubuntu as my system font but changed it (at the moment) to Fira Mono. I also had Roboto or Source Sans pro before. If the widget would default to the Ubuntu font it would feel alien then.

The best solution in my opinion would be to use the system font. In CSS this is possible with the font-family “message-box” – then a text always uses the font of the dialog boxes of the system. But this doesn’t seem to work here. And then there are widget designer who prefer to use their own fonts for their special design …

Can you help with this problem?

Provide an answer of your own, or ask Patrik B. for more information if necessary.

To post a message you must log in.