✨ Allow configuring the line number font
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 76/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- swift
- Lĩnh vực
- desktop-dev
Hướng nghiên cứu
Bắt đầu từ SourceEditorConfiguration.Appearance.font và phần xử lý didSetOnController của nó, sau đó kiểm tra GutterView.font để hiểu cách phông chữ của thước được gán. Thêm API tùy chọn lineNumberFont được đề xuất, đồng thời giữ font.rulerFont làm mặc định, và xác minh rằng các consumer có thể ghi đè phông chữ của gutter mà không thay đổi hành vi giao diện hiện có.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Description
SourceEditorConfiguration.Appearance.font configures the editor text font, but the line-number gutter replaces it with font.rulerFont in didSetOnController. There is currently no public API for choosing the exact font and point size used by line numbers.
A use case is an editor configured with Monaco 12 pt that should also render its line numbers in Monaco 12 pt. At present, this requires maintaining a fork and changing:
controller.gutterView.font = font.rulerFont
A backward-compatible API could be:
public var lineNumberFont: NSFont?
The current behavior could remain the default:
controller.gutterView.font = lineNumberFont ?? font.rulerFont
Alternatives Considered
- Making
GutterView.fontpublic. Keeping the option inAppearanceseems preferable because it avoids exposing the view implementation. - Always using
Appearance.fontfor the gutter. This would change the existing default appearance, so an optional override is safer.
Additional Context
This request is different from #58 and #157: those issues addressed the default ruler font appearance and proportional scaling. This request is specifically about allowing API consumers to override that default.
Observed on current main at revision 1fa4d3c.
Screenshots
Not applicable.
- Ngôn ngữ chính
- Swift
- Star
- 720
- Fork
- 162
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của CodeEditApp/CodeEditSourceEditor
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
CodeEditApp/CodeEditSourceEditor#377 · 1 bình luận ·
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 68/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
CodeEditApp/CodeEditSourceEditor#378 · 1 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 32/100
-
bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
Tất cả issue của CodeEditApp/CodeEditSourceEditor
Issue tương tự
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
type: docs
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 95/100
googleapis/google-cloud-swift#971 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
bitcoindevkit/bdk-ffi#1125 ·
-
Move wallpaper setting Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
mozilla-mobile/firefox-ios#35743 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
manaflow-ai/cmux#13417 ·