10. August 2020

How to increase font size in Konsole

Konsole is a great terminal emulator that you can find in many Linux distributions. The problem with some Linux distributions is that font is too small.

To change the font open menu Settings and select Edit Current Profile…

Select Preview tab and change Text size value in the middle of the screen. Click Ok to confirm the new font..

Another option to change the font size is to press CTRL and Scroll Up/Down with mouse wheel.

The same result could be also achieved by keys CTRL and +/- keys.

9. January 2019

IntelliJ Idea zoom text by mouse wheel

Common feature in many application is possibility to zoom text content by Ctrl + Mouse Wheel.

IntelliJ Idea has this feature, but it’s disabled by default.

You can enable zoom in few steps. Open Settings (Ctrl+Alt+S), search for “zoom“, select Editor.

Check the option “Change font size (Zoom) with Ctrl+Mouse Wheel“. Click OK and enjoy the zoom feature :-)

11. September 2017

How to increase font size in Wireshark 2.4 on Windows

Wireshark is based on the new version of QT, and it has a similar problem on Windows like pgAdmin 4.

If you have a screen with higher density, the font will be too small.

The solution is to add one parameter for QT engine to handle DPI differently.

Open PowerShell as Administrator and go to the directory with Wireshark open qt.conf file:

cd "C:\Program Files\Wireshark"
notepad qt.conf

Write there following content:

[Platforms]
WindowsArguments = dpiawareness=0

Save the file and start Wireshark.

Note: make sure that the file name is just qt.conf. Notepad could add .txt file extension when saving the file directly from Notepad.

Enjoy bigger font:

9. April 2017

How to edit font for OLED display SD1306

In the previous article, I’ve described how to generate custom font for OLED display like SD1306.

Meanwhile, I’ve discovered that number eight and number zero are hard to distinguish when reading from a distance, because of the dot inside the number zero.

I decided to remove the dot from number zero in order to make the font more readable. But how to do it?

Font generated from Squix’s generator is stored in form of source code. That makes it possible to edit. Just the stream of hexadecimal numbers is not very readable for a human.

Here is a small trick. Open the file in Vim in a terminal window. Search for string 0x00 which represents an area with no pixels. Vim should highlight all the occurences of 0x00. If you can’t see the highlight type command:

:set hlsearch

Start shrinking the window of the terminal and you should see that pattern begins to emerge.

When you hit the correct length of a line you should see the number clearly.

Numbers could be rotated, like number seven:

Change the font rebuild the code and the result looks like this:

2. April 2017

Custom font for OLED display connected to ESP8266 via SPI

Small OLED displays can easily extend the functionality of ESP8266.

I made an experiment with 128×64 OLED display from Com-Four.

The first challenge was how to connect the display to ESP8266. The recommended way for high performance is to use Serial Peripheral Interface Bus (SPI). The advantage of this approach is the speed, the disadvantage is that it will take more pins.

The display could be connected in following way (also described in the example of ESP8266_SD1306 library):

ESP8266 - SD1306
GND     - GND
3V      - VDD
D5      - SCK (also known as CLK)
D7      - SDA (also known as MOSI/DOUT)
D0      - RES
D2      - DC
D8      - CS

If you’re using PlatformIO, just add ESP8266_SD1306 library to dependencies in platfromio.ini:

lib_deps =
 ESP8266_SSD1306

Now you can run any example from Squix78 library. The library contains 3 sizes of Arial font: 10, 16 and 24px.

My goal was to display temperature from Observatory in Brno. Retrieving temperature and sending it to MQTT for ESP8266 was quite easy.

#!/usr/bin/env python3

import paho.mqtt.publish as publish

import urllib.request
f = urllib.request.urlopen('http://www.hvezdarna.cz/meteo/lastmeteodata')
content = f.read().decode('utf-8')

items = content.split(' ')

publish.single('/home/monitor/display/0', items[4], hostname='localhost')

I used default Arial 24 font. The problem was that the number was too small and barely readable from a distance. Luckily Daniel Eichhorn published great online tool which is able to generate font of any size for OLED display: http://oleddisplay.squix.ch.

My first attempt was to generate Roboto Light 54px font. It was working, just number 4 was not visible. I discovered a bug in the generator, that too big font will overflow default size of char in the jump table.

After several attempts I’ve found the right font for me DejaVu Sans 52px. This font was far more readable.

The last touch to make the font more readable was to tune down contrast little bit by the command:

display.setContrast(10);

I can definitely recommend this type of OLED display. It has good readability even during a sunny day. The code is available at GitHub in LampESP project.