mirror of
https://github.com/GyulyVGC/sniffnet.git
synced 2026-08-27 11:56:15 +00:00
merge Sinhala glyphs into original font file
This commit is contained in:
parent
7a2445073f
commit
e44586a171
13 changed files with 61 additions and 27 deletions
|
|
@ -6,7 +6,7 @@ All Sniffnet releases with the relative changes are documented in this file.
|
|||
- Support CIDR ranges in imported IP blacklists ([#1181](https://github.com/GyulyVGC/sniffnet/pull/1181))
|
||||
- Show number of IP addresses and CIDR ranges in imported IP blacklists ([#1183](https://github.com/GyulyVGC/sniffnet/pull/1183))
|
||||
- Added Hungarian translation 🇭🇺 ([#1197](https://github.com/GyulyVGC/sniffnet/pull/1197))
|
||||
- Added Sinhala (Sri Lanka) translation 🇱🇰 (with Noto Sans Sinhala font fallback)
|
||||
- Added Sinhala translation 🇱🇰 ([#1239](https://github.com/GyulyVGC/sniffnet/pull/1239))
|
||||
- Updated some of the existing translations to v1.5:
|
||||
- Ukrainian ([#1039](https://github.com/GyulyVGC/sniffnet/pull/1039))
|
||||
- German ([#1122](https://github.com/GyulyVGC/sniffnet/pull/1122))
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
|
|
@ -319,6 +319,56 @@ z
|
|||
ی
|
||||
۰
|
||||
۳
|
||||
ං
|
||||
අ
|
||||
ආ
|
||||
ඇ
|
||||
ඉ
|
||||
එ
|
||||
ඒ
|
||||
ඔ
|
||||
ක
|
||||
ග
|
||||
ඟ
|
||||
ච
|
||||
ජ
|
||||
ට
|
||||
ඩ
|
||||
ණ
|
||||
ත
|
||||
ථ
|
||||
ද
|
||||
ධ
|
||||
න
|
||||
ඳ
|
||||
ප
|
||||
ඵ
|
||||
බ
|
||||
භ
|
||||
ම
|
||||
ය
|
||||
ර
|
||||
ල
|
||||
ව
|
||||
ශ
|
||||
ෂ
|
||||
ස
|
||||
හ
|
||||
ළ
|
||||
ෆ
|
||||
්
|
||||
ා
|
||||
ැ
|
||||
ි
|
||||
ී
|
||||
ු
|
||||
ූ
|
||||
ෘ
|
||||
ෙ
|
||||
ේ
|
||||
ෛ
|
||||
ො
|
||||
ෝ
|
||||
ạ
|
||||
ả
|
||||
ấ
|
||||
|
|
@ -356,6 +406,7 @@ z
|
|||
ữ
|
||||
ự
|
||||
|
||||
|
||||
…
|
||||
→
|
||||
─
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
|
|
@ -12,11 +12,3 @@ grep -o --no-filename . ./src/**/* | sort -u > $FULL_FOLDER/$CHARACTERS_FILE
|
|||
pyftsubset $FULL_FOLDER/$FONT_NAME.ttf --text-file=$FULL_FOLDER/$CHARACTERS_FILE --no-ignore-missing-unicodes
|
||||
|
||||
mv $FULL_FOLDER/$FONT_NAME.subset.ttf $SUBSET_FOLDER/$FONT_NAME.subset.ttf
|
||||
|
||||
# Subset Noto Sans Sinhala (OFL) to cover the Sinhala Unicode block and common
|
||||
# zero-width joiners used for conjunct rendering.
|
||||
# Font source: https://github.com/notofonts/noto-fonts (SIL Open Font License 1.1)
|
||||
SINHALA_FONT=NotoSansSinhala-Regular
|
||||
pyftsubset $FULL_FOLDER/$SINHALA_FONT.ttf \
|
||||
--unicodes="U+0D80-0DFF,U+200C,U+200D,U+25CC" \
|
||||
--output-file=$SUBSET_FOLDER/$SINHALA_FONT.subset.ttf
|
||||
|
|
|
|||
|
|
@ -20,10 +20,6 @@ pub const SARASA_MONO: Font = Font {
|
|||
pub const ICONS_BYTES: &[u8] = include_bytes!("../../../resources/fonts/subset/icons.ttf");
|
||||
pub const ICONS: Font = Font::with_name(ICON_FONT_FAMILY_NAME);
|
||||
|
||||
// fallback font for Sinhala script
|
||||
pub const NOTO_SANS_SINHALA_BYTES: &[u8] =
|
||||
include_bytes!("../../../resources/fonts/subset/NotoSansSinhala-Regular.subset.ttf");
|
||||
|
||||
// font sizes
|
||||
pub const FONT_SIZE_FOOTER: f32 = 14.3;
|
||||
pub const FONT_SIZE_BODY: f32 = 16.8;
|
||||
|
|
|
|||
10
src/main.rs
10
src/main.rs
|
|
@ -21,9 +21,7 @@ use translations::types::language::Language;
|
|||
use utils::formatted_strings::print_cli_welcome_message;
|
||||
|
||||
use crate::gui::sniffer::FONT_FAMILY_NAME;
|
||||
use crate::gui::styles::style_constants::{
|
||||
ICONS_BYTES, NOTO_SANS_SINHALA_BYTES, SARASA_MONO_BYTES,
|
||||
};
|
||||
use crate::gui::styles::style_constants::{ICONS_BYTES, SARASA_MONO_BYTES};
|
||||
use crate::gui::types::conf::CONF;
|
||||
|
||||
mod chart;
|
||||
|
|
@ -84,11 +82,7 @@ pub fn main() -> iced::Result {
|
|||
.settings(iced::Settings {
|
||||
// id needed for Linux Wayland; should match StartupWMClass in .desktop file; see issue #292
|
||||
id: Some(String::from(SNIFFNET_LOWERCASE)),
|
||||
fonts: vec![
|
||||
Cow::Borrowed(SARASA_MONO_BYTES),
|
||||
Cow::Borrowed(ICONS_BYTES),
|
||||
Cow::Borrowed(NOTO_SANS_SINHALA_BYTES),
|
||||
],
|
||||
fonts: vec![Cow::Borrowed(SARASA_MONO_BYTES), Cow::Borrowed(ICONS_BYTES)],
|
||||
default_font: Font::with_name(FONT_FAMILY_NAME),
|
||||
default_text_size: Pixels(FONT_SIZE_BODY),
|
||||
antialiasing: true,
|
||||
|
|
|
|||
|
|
@ -1695,7 +1695,7 @@ pub fn incoming_translation(language: Language) -> &'static str {
|
|||
Language::ID => "Masuk",
|
||||
Language::NL => "Inkomend",
|
||||
Language::HU => "Beérkező",
|
||||
Language::SI => "එන",
|
||||
Language::SI => "එන",
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1725,7 +1725,7 @@ pub fn outgoing_translation(language: Language) -> &'static str {
|
|||
Language::ID => "Keluar",
|
||||
Language::NL => "Uitgaand",
|
||||
Language::HU => "Kimenő",
|
||||
Language::SI => "යන",
|
||||
Language::SI => "යන",
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -181,7 +181,7 @@ pub fn host_translation(language: Language) -> &'static str {
|
|||
Language::NL => "Netwerk host",
|
||||
Language::EL => "Κόμβος δικτύου",
|
||||
Language::HU => "Hálózati gazda",
|
||||
Language::SI => "නෙට්වර්ක් හොස්ට් එක",
|
||||
Language::SI => "නෙට්වර්ක් හොස්ට් එක",
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -271,7 +271,7 @@ pub fn local_translation(language: Language) -> &'static str {
|
|||
Language::NL => "Lokaal netwerk",
|
||||
Language::EL => "Τοπικό δίκτυο",
|
||||
Language::HU => "Helyi hálózat",
|
||||
Language::SI => "ලෝකල් නෙට්වර්ක් එක",
|
||||
Language::SI => "ලෝකල් නෙට්වර්ක් එක",
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -425,7 +425,7 @@ pub fn source_translation(language: Language) -> &'static str {
|
|||
Language::NL => "Bron",
|
||||
Language::EL => "Πηγή",
|
||||
Language::HU => "Forrás",
|
||||
Language::SI => "ආරම්භය",
|
||||
Language::SI => "ආරම්භය",
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -368,7 +368,7 @@ pub fn unsupported_link_type_translation(language: Language) -> &'static str {
|
|||
Language::HU => {
|
||||
"Az ezzel az adapterrel asszociált link típust még nem támogatja a Sniffnet..."
|
||||
}
|
||||
Language::SI => "මෙම ඇඩැප්ටරයට සම්බන්ධ සබැඳි වර්ගයට දැනට Sniffnet සහාය නොමැත.",
|
||||
Language::SI => "මෙම ඇඩැප්ටරයට සම්බන්ධ සබැඳි වර්ගයට දැනට Sniffnet සහාය නොමැත...",
|
||||
_ => "The link type associated with this adapter is not supported by Sniffnet yet...",
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -149,6 +149,7 @@ impl Language {
|
|||
| Language::EL
|
||||
| Language::HU
|
||||
| Language::RU
|
||||
| Language::SI
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue