Opened 10 years ago
Closed 10 years ago
#11764 closed bug (fixed)
Terminal displays incorrectly with proportional font when DejaVu is uninstalled
Reported by: | mounty | Owned by: | jackburton |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | Applications/Terminal | Version: | R1/Development |
Keywords: | Cc: | ||
Blocked By: | Blocking: | #11792 | |
Platform: | All |
Description
Since the DejaVu font is no longer installed by default, the terminal metric calculations with the default proportional font are haywire; it is necessary to use the settings to put it back to a fixed-pitch font.
Attachments (2)
Change History (18)
comment:1 by , 10 years ago
comment:2 by , 10 years ago
It was based on comments by various people in a discussion in the haiku-development list. See my message "various problems with current developer head" dated Sat, 17 Jan 2015 15:17:01 +1000 and the various responses thereto.
The terminal display is haywire but it may be that my explanation thereof is incorrect.
comment:3 by , 10 years ago
Keywords: | font fixed metric removed |
---|---|
Priority: | high → normal |
Resolution: | → invalid |
Status: | new → closed |
Yes, I read that thread and it contains a few misconceptions.
The DejaVu typeface is installed by default and Terminal is using its Sans Mono font by default. VL-Gothic will be used as a fallback where the default font has no glyph coverage.
Now, if you remove the DejaVu typeface, Haiku currently defaults to using Bitstream Charter, with VL-Gothic providing fallback where Charter has no glyph coverage.
comment:4 by , 10 years ago
I didn't remove any fonts. I performed a developer build, booted the resulting installation, and opened the terminal. It came up about twice as wide as normal, with the displayed characters widely separated.
comment:5 by , 10 years ago
DejaVu is included in all officially released images. It is certainly possible to produce a custom build that doesn't contain DejaVu. Not sure what you mean by developer build, but if you use a @nightly or @release build profile you should be good.
comment:6 by , 10 years ago
Resolution: | invalid |
---|---|
Status: | closed → reopened |
The fact that DejaVu can be removed is not a bug, and yes, it is still in the default profiles.
However, when DejaVu is removed, the terminal should default to VL-Gothic. It should not use Bitstream Charter, which is a proportional font. VL-Gothic is always installed because it is a dependency of the Haiku package.
comment:7 by , 10 years ago
Summary: | Terminal displays incorrectly with default proportional font → Terminal displays incorrectly with proportional font when DejaVu is uninstalled |
---|
comment:8 by , 10 years ago
I say again: I did not remove any fonts. The procedure I followed is:
-
git pull -v
==> hrev48700 -
jam
arguments - reboot into newly-installed system (jam installs to a separate partition)
- don't install; go straight to desktop
- open terminal and enter
ls -l
- screenshot of result is attached
by , 10 years ago
Attachment: | Haiku-terminal-1.png added |
---|
screenshot of terminal showing proportional fonts
follow-up: 12 comment:9 by , 10 years ago
The key here is the "arguments". If you use the minimal build profile (as is the case with jam -q haiku.image, for example), the DejaVu font is not installed. But if you use the "alpha" or "nightly" profiles, it is.
You can use AddHaikuImagePackages dejavu ;
to add the font to your image, and it will be used by default.
In any case, Terminal should not end up using Bitstream Charter, it should pick a monospace font as long as one is available.
comment:10 by , 10 years ago
Sorry, yes, I was using a minimal build profile. Now that I've switched to a nightly-
profile, DejaVu is included and the terminal is displayed correctly.
comment:12 by , 10 years ago
Replying to pulkomandy:
The key here is the "arguments". If you use the minimal build profile (as is the case with jam -q haiku.image, for example), the DejaVu font is not installed. But if you use the "alpha" or "nightly" profiles, it is.
You can use
AddHaikuImagePackages dejavu ;
to add the font to your image, and it will be used by default.In any case, Terminal should not end up using Bitstream Charter, it should pick a monospace font as long as one is available.
I built a minimal haiku image with some debug added in Terminal, and ran Terminal. I could reproduce the problem, and confirmed that Terminal uses the default monospace font. The problem is, that there is NO monospace font available (VL-Gothic is not a monospace font), as you can see in the screenshot I added here. As soon as you open the Terminal settings window, the code in there correctly scans for Fixed or Full-And-Half-Fixed fonts, and correctly chooses VL-Gothic. To fix this, I could add some code which, on Terminal initialization, chooses a random suitable font if the default monospace font is missing (no idea if this is possible). Otherwise, we could make sure that a default monospace font is always available.
by , 10 years ago
Attachment: | schermata2.png added |
---|
comment:13 by , 10 years ago
Status: | reopened → in-progress |
---|
comment:14 by , 10 years ago
I added this code to Terminal initialization:
font_family family; font_style style; be_fixed_font->GetFontAndFamily(&family, &style); printf("family: %s, style: %s\n", family, style);
And the result is: family: BitStream Charter, style: Regular
comment:15 by , 10 years ago
Fixed in hrev48823 . I added some code in PrefHandler, which checks if be_fixed_font isn't usable, and search for an usable font. This should always work, since VL-Gothic is a dependency of the haiku package.
comment:16 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | in-progress → closed |
I don't understand. What makes you say that DejaVu isn't installed by default? It's included in both the @release and the @nightly profiles. How do you manage not to get DejaVu installed by default?