GithubHelp home page GithubHelp logo

Comments (29)

LyesSaadi avatar LyesSaadi commented on May 28, 2024 1

@maweki I've solved the issue and updated the COPR build by changing the font to serif in the package. If you want to try the update: sudo dnf update notekit --refresh.

from notekit.

maweki avatar maweki commented on May 28, 2024 1

The gtk font chooser is no option?

from notekit.

blackhole89 avatar blackhole89 commented on May 28, 2024

Odd. What's the output if you type locale into the same terminal that you launch it from? Does this happen immediately upon start? Could it be related to the colour palette issue in some way?

from notekit.

maweki avatar maweki commented on May 28, 2024
$ locale
LANG=de_DE.UTF-8
LC_CTYPE="de_DE.UTF-8"
LC_NUMERIC="de_DE.UTF-8"
LC_TIME="de_DE.UTF-8"
LC_COLLATE="de_DE.UTF-8"
LC_MONETARY="de_DE.UTF-8"
LC_MESSAGES="de_DE.UTF-8"
LC_PAPER="de_DE.UTF-8"
LC_NAME="de_DE.UTF-8"
LC_ADDRESS="de_DE.UTF-8"
LC_TELEPHONE="de_DE.UTF-8"
LC_MEASUREMENT="de_DE.UTF-8"
LC_IDENTIFICATION="de_DE.UTF-8"
LC_ALL=
$ notekit
== This is notekit, built at Sat Oct 26 20:14:33 2019. ==
Detected paths:
Config: /home/maweki/.config/notekit
Active notes path: /home/maweki/.local/share/notekit
Default notes path: /home/maweki/.local/share/notekit
Resource path: /usr/share//notekit

color1

This is the COPR build. I'll try building from source as soon as I can.

from notekit.

maweki avatar maweki commented on May 28, 2024

I can type normally and it saves correctly but shows these numeric symbols. So maybe this is a font issue?!

from notekit.

blackhole89 avatar blackhole89 commented on May 28, 2024

The locale settings look correct. Do you in fact have a /usr/share/notekit folder with a data/ and a sourceview/ subfolder?

So if you type, save and reload what you typed, the text you typed shows up fine? The problem with the numeric symbols is that they are placeholder characters for missing glyphs, but depending on their interpretation (I'm not sure if the top line or the bottom line holds the high or the low byte respectively...), they look like placeholders for the basic ASCII plane. (e.g. $68 $74 $74 $70 is just "http"). So either we're missing a font for basic ASCII, or somehow the characters in the file got shifted by 256 (i.e. they're actually $6800, $7400, ...)

(...missing a font? Do you have the Bitstream Charter font installed? If not, can you try finding the line font: 16px Bitstream Charter; in data/stylesheet.css and replacing the font name with something that exists on your system?)

from notekit.

maweki avatar maweki commented on May 28, 2024

I can now confirm this issue on multiple, but more or less identically configured, Fedora 31 systems.

Font navigator says I do have Bitstream Charter. But if I comment out the line with the font info, then it works.

So this works but obviously with the wrong font.

#mainView {
/*    font: 16px Bitstream Charter;*/
    padding-top: 16px;
    padding-right: 16px;
    padding-bottom: 16px;
}

Bildschirmfoto von 2019-11-01 23-20-55

This is a screenshot of Fedora's font manager.

from notekit.

maweki avatar maweki commented on May 28, 2024

Okay, this gets quite strange. If I want to choose Bitstream Charter as a font for gedit, it does not appear in the chooser menu. Only bitstream vera does. Is there a way to just use the system's monospace font like gedit does when you don't choose a special one?

from notekit.

blackhole89 avatar blackhole89 commented on May 28, 2024

Since the dialog you screenshotted says it's a PostScript Type 1 font, could it be that the applications in question only support TTF and TTF-derived fonts for you? (My copy of it is also Type 1, but it came with the texlive-fonts-recommended and is accordingly in a different folder. If I had realised it came from such a niche package, I probably wouldn't have picked it as the default font.)

Could you perhaps test for me if the fallback mechanism works correctly if you replace the line in question with font: 16px Bitstream Charter, serif;? If that's the case, I could change the default stylesheet to this, so it uses the system serif font whenever Bitstream Charter is unavaiable.

from notekit.

maweki avatar maweki commented on May 28, 2024
  • Using only serif leads to the following error: (notekit:4679): Gtk-WARNING **: 11:10:30.958: Theme parsing error: stylesheet.css:66:15: Using Pango syntax for the font: style property is deprecated; please use CSS syntax and then terminate called after throwing an instance of 'Gtk::CssProviderError' with a core dump
  • Using 16px serif works
  • Using 16px Bitstream Charter, 16px serif; directly terminates with terminate called after throwing an instance of 'Gtk::CssProviderError' and core dump
  • Using 16px serif, 16px Bitstream Charter terminates the same way.
  • Using the original 16px Bitstream Charter does not throw the Gtk::CssProviderError, as we know
  • Splitting font into font-size (16px) and font-family: Bitstream Charter, serif; does not throw an error but also has the wrong behaviour. It looks like the font can be loaded somewhat successfully (e.g. is found) but then can't really be used.

For me this font seems to come from some X11 package. I tried a session with Xorg instead of Wayland but that didn't work either. Libreoffice does also not show Bitstream Charter as usable font. The package that provides the font for me is xorg-x11-fonts-Type1-7.5-23.fc31.noarch which I can't remove since libreoffice-base, java-1.8.0-openjdk-devel, and eclipse-swt depend on it.

So apparently this does work on other systems and it worked on fedora 30 so some library must have changed to cause this. I don't really know which project to write a ticket against and what to do about this in notekit besides just changing the font to the system one.

from notekit.

blackhole89 avatar blackhole89 commented on May 28, 2024

Thanks for checking all of these. It looks like the only ways around this problem may be to either give up on Bitstream Charter completely (something I'm reluctant to do, because it's a very nice font...), or to add special rules for Fedora somewhere (to create a custom fontconfig rule, bundle a working copy of Bitstream Charter, or have a different CSS line). I'll think about which option is the best.

from notekit.

maweki avatar maweki commented on May 28, 2024

This packaging seems to work. I'm pretty sure this will be a problem for other distributions as well but who knows which combination of packages breaks that font.

from notekit.

blackhole89 avatar blackhole89 commented on May 28, 2024

I don't know -- on my system (Debian), even entering a non-existent font just results in it rendering in the default sans-serif font (which is actually a bit of a problem too, since it makes it impossible to specify HTML-style fallback chains).

from notekit.

maweki avatar maweki commented on May 28, 2024

entering a non-existent font

apparently my issue is an existing font that is somewhat broken.

HTML-style fallback chains

have you tried it with font-family? For me the fallback works fine.

from notekit.

blackhole89 avatar blackhole89 commented on May 28, 2024

apparently my issue is an existing font that is somewhat broken.

Yeah, I understand. The question is how many distros that exact font will be present on but broken in a similar way...

font-family

Yeah. I think that for whatever reason, my system basically treats every font name as existent and fills in glyphs from default fonts as needed. (I may have done that myself long ago as a nuclear solution for some international font issue or another.)

from notekit.

kaimast avatar kaimast commented on May 28, 2024

Have the same bug on Ubuntu 20.04 with GNOME. I have texlive-fonts-recommended installed... Any suggestions?

from notekit.

blackhole89 avatar blackhole89 commented on May 28, 2024

What happens if you change the line near the bottom of stylesheet.css that says font: 16px Bitstream Charter to something different, say font: 16px Bitstream Charter, serif (to see if the HTML-style fallbacks work) or just font: 16px serif?

from notekit.

kaimast avatar kaimast commented on May 28, 2024

Fallback doesn't seem to work. Changing to another font does.

I tried to find the Debian package that has this font but was unsuccessful so far. Maybe use a different default font?

from notekit.

blackhole89 avatar blackhole89 commented on May 28, 2024

Blegh, it's really a bummer that fallback doesn't work. Do you think it would be reasonable to bundle the font with the distribution? Bitstream Charter is nice and has a permissive license, and it seems to me that a bad default font would significantly detract from the new user experience (though of course not as much as everything rendering as tofu :))

(I think we can probably load a font from disk using FcConfigAppFontAddFile; an additional dependency on fontconfig-dev would hardly be the worst considering we already need Gtk+.)

from notekit.

blackhole89 avatar blackhole89 commented on May 28, 2024

I guess I could, but then there would be some weirdness in that the font setting of the stylesheet is the one thing that gets overridden and does nothing (by, presumably, the user config file). (I assume that trying to parse and modify stylesheet.css itself to overwrite the font setting in it would be hairy and brittle.) Also, there still would be the question of what should be the default setting...

from notekit.

maweki avatar maweki commented on May 28, 2024

Just a general family like serif?

from notekit.

blackhole89 avatar blackhole89 commented on May 28, 2024

But that does look terrible on a lot of systems (and first impressions matter...).

Do you think there's anything wrong with bundling Bitstream Charter? It's fairly compact (4x35KB or so). This would still leave open the possibility of adding a font picker to the app (and using config.json to store the setting).

from notekit.

maweki avatar maweki commented on May 28, 2024

Is there a way to choose the system default? You could also open did dialogue on first start. Bundling might also be fine, I just wonder how other apps do it, without bundling.

Maybe we read the available fonts and preselect the best one we know and fallback to either a bad one or the chooser.

But adding the font selector would be nice, independent of everything else.

from notekit.

blackhole89 avatar blackhole89 commented on May 28, 2024

Would appreciate feedback on whether this way of bundling it works (i.e. it correctly recognises the font now).

from notekit.

 avatar commented on May 28, 2024

On Arch Linux (even if compiled from source) it's still broken...

I also second the suggestion from @maweki about the font selector, as I find the font size really big on my 27" monitor :)

from notekit.

blackhole89 avatar blackhole89 commented on May 28, 2024

Still broken as in... it displays the boxes as in the initial report's screenshot?

from notekit.

 avatar commented on May 28, 2024

Still broken as in... it displays the boxes as in the initial report's screenshot?

Exactly.

from notekit.

blackhole89 avatar blackhole89 commented on May 28, 2024

I think we might have bumped into this issue. I have replaced the bundled Type1 fonts with OpenType versions; can you check if this fixes it for you?

from notekit.

 avatar commented on May 28, 2024

Now it works (at least for me)...

from notekit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.