You've already forked macports-ports
mirror of
https://github.com/macports/macports-ports.git
synced 2026-07-12 18:20:25 -07:00
rio: update to 0.4.7
Remove obsolete patch.
This commit is contained in:
+643
-661
File diff suppressed because it is too large
Load Diff
@@ -1,114 +0,0 @@
|
||||
diff --git a/frontends/rioterm/src/renderer/mod.rs b/frontends/rioterm/src/renderer/mod.rs
|
||||
index f42b357..12ff257 100644
|
||||
--- a/frontends/rioterm/src/renderer/mod.rs
|
||||
+++ b/frontends/rioterm/src/renderer/mod.rs
|
||||
@@ -210,16 +210,13 @@ impl Renderer {
|
||||
square.c()
|
||||
};
|
||||
|
||||
- let font_attrs = match (
|
||||
- flags.contains(StyleFlags::ITALIC),
|
||||
- flags.contains(StyleFlags::ITALIC) && flags.contains(StyleFlags::BOLD),
|
||||
- flags.contains(StyleFlags::BOLD),
|
||||
- ) {
|
||||
- (true, _, _) => (Stretch::NORMAL, Weight::NORMAL, Style::Italic),
|
||||
- (_, true, _) => (Stretch::NORMAL, Weight::BOLD, Style::Italic),
|
||||
- (_, _, true) => (Stretch::NORMAL, Weight::BOLD, Style::Normal),
|
||||
- _ => (Stretch::NORMAL, Weight::NORMAL, Style::Normal),
|
||||
- };
|
||||
+ let font_attrs =
|
||||
+ match (flags.contains(StyleFlags::BOLD), flags.contains(StyleFlags::ITALIC)) {
|
||||
+ (true, true) => (Stretch::NORMAL, Weight::BOLD, Style::Italic),
|
||||
+ (true, false) => (Stretch::NORMAL, Weight::BOLD, Style::Normal),
|
||||
+ (false, true) => (Stretch::NORMAL, Weight::NORMAL, Style::Italic),
|
||||
+ _ => (Stretch::NORMAL, Weight::NORMAL, Style::Normal),
|
||||
+ };
|
||||
|
||||
if flags.contains(StyleFlags::INVERSE) {
|
||||
std::mem::swap(&mut background_color, &mut foreground_color);
|
||||
@@ -832,15 +829,12 @@ impl Renderer {
|
||||
) -> (SpanStyle, char) {
|
||||
let flags = cell_style.flags;
|
||||
- let font_attrs = match (
|
||||
- flags.contains(StyleFlags::ITALIC),
|
||||
- flags.contains(StyleFlags::ITALIC) && flags.contains(StyleFlags::BOLD),
|
||||
- flags.contains(StyleFlags::BOLD),
|
||||
- ) {
|
||||
- (true, _, _) => (Stretch::NORMAL, Weight::NORMAL, Style::Italic),
|
||||
- (_, true, _) => (Stretch::NORMAL, Weight::BOLD, Style::Italic),
|
||||
- (_, _, true) => (Stretch::NORMAL, Weight::BOLD, Style::Normal),
|
||||
- _ => (Stretch::NORMAL, Weight::NORMAL, Style::Normal),
|
||||
- };
|
||||
+ let font_attrs =
|
||||
+ match (flags.contains(StyleFlags::BOLD), flags.contains(StyleFlags::ITALIC)) {
|
||||
+ (true, true) => (Stretch::NORMAL, Weight::BOLD, Style::Italic),
|
||||
+ (true, false) => (Stretch::NORMAL, Weight::BOLD, Style::Normal),
|
||||
+ (false, true) => (Stretch::NORMAL, Weight::NORMAL, Style::Italic),
|
||||
+ _ => (Stretch::NORMAL, Weight::NORMAL, Style::Normal),
|
||||
+ };
|
||||
|
||||
let mut color = self.compute_color(&cell_style.fg, flags, term_colors);
|
||||
let mut background_color = self.compute_bg_color(cell_style, term_colors);
|
||||
diff --git a/sugarloaf/src/font/mod.rs b/sugarloaf/src/font/mod.rs
|
||||
index 914a461..b1961b9 100644
|
||||
--- a/sugarloaf/src/font/mod.rs
|
||||
+++ b/sugarloaf/src/font/mod.rs
|
||||
@@ -20,7 +20,7 @@ use crate::font_introspector::text::cluster::{CharCluster, Status};
|
||||
use crate::font_introspector::text::Codepoint;
|
||||
use crate::font_introspector::text::Script;
|
||||
-use crate::font_introspector::{tag_from_bytes, CacheKey, FontRef, Synthesis};
|
||||
+use crate::font_introspector::{tag_from_bytes, Attributes, CacheKey, FontRef, Synthesis};
|
||||
use crate::layout::SpanStyle;
|
||||
use crate::SugarloafErrors;
|
||||
use dashmap::DashMap;
|
||||
use parking_lot::RwLock;
|
||||
@@ -686,7 +686,14 @@ impl FontData {
|
||||
let should_embolden = font_spec.weight >= Some(700) && weight < Weight(700);
|
||||
|
||||
let stretch = attributes.stretch();
|
||||
- let synth = attributes.synthesize(attributes);
|
||||
+
|
||||
+ let requested_weight = font_spec.weight.map(Weight).unwrap_or(Weight::NORMAL);
|
||||
+ let requested_style = match font_spec.style {
|
||||
+ SugarloafFontStyle::Italic => Style::Italic,
|
||||
+ SugarloafFontStyle::Normal => Style::Normal,
|
||||
+ };
|
||||
+ let requested_attrs = Attributes::new(stretch, requested_weight, requested_style);
|
||||
+ let synth = attributes.synthesize(requested_attrs);
|
||||
let is_emoji = has_color_tables(&font);
|
||||
|
||||
let data = (!evictable).then_some(data);
|
||||
diff --git a/sugarloaf/src/renderer/image_cache/glyph.rs b/sugarloaf/src/renderer/image_cache/glyph.rs
|
||||
index d886938..6b63e48 100644
|
||||
--- a/sugarloaf/src/renderer/image_cache/glyph.rs
|
||||
+++ b/sugarloaf/src/renderer/image_cache/glyph.rs
|
||||
@@ -156,6 +156,7 @@ impl GlyphCacheSession<'_> {
|
||||
let font_data = font_library_data.get(&self.font);
|
||||
let should_embolden = font_data.should_embolden;
|
||||
let should_italicize = font_data.should_italicize;
|
||||
+ let synth = font_data.synth;
|
||||
|
||||
if let Some((shared_data, offset, cache_key)) =
|
||||
font_library_data.get_data(&self.font)
|
||||
@@ -165,6 +166,12 @@ impl GlyphCacheSession<'_> {
|
||||
offset,
|
||||
key: cache_key,
|
||||
};
|
||||
+
|
||||
+ let coords: Vec<_> = font_ref
|
||||
+ .variations()
|
||||
+ .normalized_coords(synth.variations().iter().copied())
|
||||
+ .collect();
|
||||
+
|
||||
let mut scaler = self
|
||||
.scale_context
|
||||
.builder(font_ref)
|
||||
@@ -176,7 +183,7 @@ impl GlyphCacheSession<'_> {
|
||||
// .hint(!IS_MACOS)
|
||||
.hint(enable_hint)
|
||||
.size(size.into())
|
||||
- // .normalized_coords(coords)
|
||||
+ .normalized_coords(&coords)
|
||||
.build();
|
||||
|
||||
// let embolden = if IS_MACOS { 0.25 } else { 0. };
|
||||
Reference in New Issue
Block a user