diff options
author | dec05eba <dec05eba@protonmail.com> | 2020-11-21 20:46:24 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-11-21 20:46:24 +0100 |
commit | 600bdbe99f09162ebf264af88ac7cd91d36ac035 (patch) | |
tree | cfe8df80f2e4376f2e73b6f5b681a017a99a239c | |
parent | 44e66882f6e517b06522cb1e510ed9dea7574273 (diff) |
Smooth emoji
-rw-r--r-- | TODO | 3 | ||||
-rw-r--r-- | src/ResourceLoader.cpp | 1 | ||||
-rw-r--r-- | src/Text.cpp | 2 |
3 files changed, 4 insertions, 2 deletions
@@ -133,4 +133,5 @@ Fetching of previous messages should also be saved in the /sync file and message If manga page fails to download then show "failed to download image" as text and bind F5 to refresh (retry download). Use <img src to add custom emojis, and add setting for adding/removing custom emoji. Use window title when room name changes in matrix. -Prev token is incorrect if additional messages have been fetched and comparing to get_previous_messages set token, because prev token is not set when fetching additional messages.
\ No newline at end of file +Prev token is incorrect if additional messages have been fetched and comparing to get_previous_messages set token, because prev token is not set when fetching additional messages. +Use unsigned.transaction_id to match messages we post with messages in sync response (for filtering what we send).
\ No newline at end of file diff --git a/src/ResourceLoader.cpp b/src/ResourceLoader.cpp index 9a6060d..77ad675 100644 --- a/src/ResourceLoader.cpp +++ b/src/ResourceLoader.cpp @@ -73,6 +73,7 @@ namespace QuickMedia::TextureLoader { sf::Texture *result = new_texture.get(); if(!new_texture->loadFromFile(resource_root + str)) fprintf(stderr, "Failed to load image: %s%s\n", resource_root.c_str(), filepath); + new_texture->setSmooth(true); texture_cache[str] = std::move(new_texture); return result; } diff --git a/src/Text.cpp b/src/Text.cpp index 539f211..46e09de 100644 --- a/src/Text.cpp +++ b/src/Text.cpp @@ -364,7 +364,7 @@ namespace QuickMedia int vertexStart = vertices[vertices_index].getVertexCount(); EmojiRectangle emoji_rec = emoji_get_extents(codePoint); - const float font_height_offset = -latin_font_height * 1.0f; + const float font_height_offset = -latin_font_height * 1.2f; sf::Vector2f vertexTopLeft(glyphPos.x, glyphPos.y + font_height_offset - emoji_rec.height * 0.5f); sf::Vector2f vertexTopRight(glyphPos.x + emoji_rec.width, glyphPos.y + font_height_offset - emoji_rec.height * 0.5f); sf::Vector2f vertexBottomLeft(glyphPos.x, glyphPos.y + font_height_offset + emoji_rec.height * 0.5f); |