Annotation with differing font sizes?
Posted: 2016-08-15T11:00:42-07:00
These questions refer to IM version 6.9.5 runnning on a GNU/Linux system.
The scenario: a lightweight WM/desktop that uses a weather map, regularly updated throughout the day, as a desktop background. I set up this auto-refreshing desktop a few years ago, and it uses wget to download the map and IM to crop the map over a certain geographical area. A cron job runs at intervals to put the resulting map on the root window. It's been working great. I decided recently to enhance it somewhat by adding a bit of text to the map, text that contains some numerical weather values (current temperature, humidity, etc). I also use wget for that to downbload a text file, which I then parse with an awk script someone helped me cobble together.
I decided to use annotate to superimpose a few lines of text, in a certain location, over the weather map. I mainly appropriated the "fancy label" example found at http://www.imagemagick.org/Usage/annotating/. The results actually look pretty good, though I'm wondering about improving it a bit more. The improvement I have in mind is increasing the font size of one line of text, while reducing the font size in the other lines of text. What is of most interest to me is outside temperature, so I'd like to have that line in a very large font size, one I can read without my glasses. The other text could be a reduced size, since that information will not be so vital.
I currently have the text being added to the image in a single, rather lengthy command. I'd like, if possible, to stick with the one-liner approach. But from what I'm so far gathering, to do what I'm after, that is, to make the lines of text I'm superimposing have differing size fonts, I suspect I will be unable to use that approach. I think what I might need to do in order for this new scheme to work, will be to create of the lines of text a separate image, then to superimpose that image on the weather map image. So, am I right about that?
Here's a visual example of what I'm now doing: https://s3.postimg.io/tmi1tei2r/tmp_Desktopscrsht.png . What I'm aiming at is to have the temperature line in a font, say, at least twice the size of the time, conditions, and humidity lines. All lines are currently -pointsize 36. So maybe the pointsize for 3 lines could be reduced to pointsize 20, while the temperature line could be increased to 72 or something. What are the possible ways of doing something like this? Suggestions will be appreciated.
The scenario: a lightweight WM/desktop that uses a weather map, regularly updated throughout the day, as a desktop background. I set up this auto-refreshing desktop a few years ago, and it uses wget to download the map and IM to crop the map over a certain geographical area. A cron job runs at intervals to put the resulting map on the root window. It's been working great. I decided recently to enhance it somewhat by adding a bit of text to the map, text that contains some numerical weather values (current temperature, humidity, etc). I also use wget for that to downbload a text file, which I then parse with an awk script someone helped me cobble together.
I decided to use annotate to superimpose a few lines of text, in a certain location, over the weather map. I mainly appropriated the "fancy label" example found at http://www.imagemagick.org/Usage/annotating/. The results actually look pretty good, though I'm wondering about improving it a bit more. The improvement I have in mind is increasing the font size of one line of text, while reducing the font size in the other lines of text. What is of most interest to me is outside temperature, so I'd like to have that line in a very large font size, one I can read without my glasses. The other text could be a reduced size, since that information will not be so vital.
I currently have the text being added to the image in a single, rather lengthy command. I'd like, if possible, to stick with the one-liner approach. But from what I'm so far gathering, to do what I'm after, that is, to make the lines of text I'm superimposing have differing size fonts, I suspect I will be unable to use that approach. I think what I might need to do in order for this new scheme to work, will be to create of the lines of text a separate image, then to superimpose that image on the weather map image. So, am I right about that?
Here's a visual example of what I'm now doing: https://s3.postimg.io/tmi1tei2r/tmp_Desktopscrsht.png . What I'm aiming at is to have the temperature line in a font, say, at least twice the size of the time, conditions, and humidity lines. All lines are currently -pointsize 36. So maybe the pointsize for 3 lines could be reduced to pointsize 20, while the temperature line could be increased to 72 or something. What are the possible ways of doing something like this? Suggestions will be appreciated.