Comments (10)
Hey!
I'm kinda busy right now, but following the issues here anyways. QFont::insertSubstitutions
sounds like a good solution to me
Interesting solution. Doesn't rely on the user having one of those fonts installed though? Might be better to package one with Kristall. I also think it'd be good to add Noto Color Emoji there too.
Yeah that would've been my plan here. Package a emoji font and set it as substitutions.
The load/save/apply workflow is strange and buggy. I don't know where the theme files are stored, but they survive a recompile on my system. I wish that was a bit clearer. They're not in ~/.config as far as I can see.
Can you please make a separate issue for that? I tested loading/saving, but i changed a whole lot of stuff there. Themes are stored in ~/config/kristall/themes
as files, you should be able to drop the themes just in there...
from kristall.
It'd be nice if twemoji was included or something to guarantee emojis across all platforms and font setups.
from kristall.
This bug appears to be caused by Kristall not switching fonts when an emoji is in the text. Most fonts don't support emojis, and so I can't get them to display. I was able to fix this by setting my font to one of the Noto Emoji fonts, but this isn't a long term solution.
from kristall.
Interestingly, the behaviour on macOS is that fonts get an automatic override (apparently at the system level, not sure) and use Apple Color Emoji.
I think a patch to src/documentstyle.cpp
in the DocumentStyle constructor roughly around line 155 like this should work:
DocumentStyle::DocumentStyle() : theme(Fixed),
[...]
h3_font.setFamily("sans");
h3_font.setBold(true);
h3_font.setPointSizeF(16.0);
QStringList emojiFonts = { "Apple Color Emoji", "Segoe UI Emoji", "Twitter Color Emoji" };
QFont::insertSubstitutions("sans", emojiFonts);
QFont::insertSubstitutions("monospace", emojiFonts);
}
from kristall.
Oh and I guess you'd also have to call QFont::insertSubstitutions("Fancy User Font", emojiFonts);
on custom fonts somewhere too.
from kristall.
Interesting solution. Doesn't rely on the user having one of those fonts installed though? Might be better to package one with Kristall. I also think it'd be good to add Noto Color Emoji
there too.
from kristall.
I agree, but I think it would be appropriate to leave the included font as the last failover so that the system emoji font is used first. Perhaps that could be a setting as well.
I do think that the whole font and theming system needs a refactor though. The load/save/apply workflow is strange and buggy. I don't know where the theme files are stored, but they survive a recompile on my system. I wish that was a bit clearer. They're not in ~/.config
as far as I can see.
from kristall.
Basic emoji support has landed in 7f0143b. Can you all please test if it works for you?
from kristall.
I built directly from that commit, and for some reason it shows all emojis in a line drawing format, even ones that aren't specced by Unicode as having a line drawn option.
I am not sure why this is happening as it appears Kristall loads its own font files.
from kristall.
@MasterQ32 Any idea about this? Still experiencing it with the latest commit be06c40.
from kristall.
Related Issues (20)
- response header edge case
- Bug: "Line is too short for valid protocol" HOT 1
- Support small screens HOT 2
- Icons not visible to the left of the URL bar. HOT 1
- Optimisation for opening large documents.
- qt5-tools needed on Arch Linux
- kristall -v option doesn't have a version when built outside a git repo HOT 3
- Error when clicking on unicode/punycode links
- Apple Mac ARM build? HOT 1
- Bug in manpage creation using dash HOT 7
- Ability to center all headers
- CMake support: HOT 1
- Update Search Engines list HOT 1
- Ability to set indentation of the first line of paragraph
- gopher "go to parent" renders parent as raw text - no links | bug | nightly build | osx HOT 2
- Indicate bundled dependencies and their licenses HOT 1
- Add AppData file
- Add install section to CMake file HOT 1
- Default protocol configurable and relative URL mode
- Support subscribing to Gemini feeds
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kristall.