Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/printing/word_export_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,7 @@ const Map<String, String> _wordFontNames = {
'NotoSerifHebrew': 'Noto Serif Hebrew',
'Tinos': 'Tinos',
'NotoRashiHebrew': 'Noto Rashi Hebrew',
'Mekorot': 'Mekorot',
'Rubik': 'Rubik',
};

Expand Down
8 changes: 8 additions & 0 deletions lib/theme/app_fonts.dart
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ class AppFonts {
/// שונה מה-regular, ולכן כותרת מודגשת נראית כגופן אחר מהגוף.
static const Set<String> _separateBoldFaceFonts = {
'FrankRuhlCLM',
'Mekorot',
'OtzariaAshurit',
'OtzariaAshuritNikud',
};
Expand Down Expand Up @@ -158,6 +159,11 @@ class AppFonts {
FontInfo(value: 'Tinos', label: 'טינוס', category: FontCategory.serif),
FontInfo(
value: 'NotoRashiHebrew',
label: 'רש"י נוטו',
category: FontCategory.serif,
),
FontInfo(
value: 'Mekorot',
label: 'רש"י',
category: FontCategory.serif,
),
Expand Down Expand Up @@ -685,13 +691,15 @@ class AppFonts {
'NotoSerifHebrew': 'fonts/NotoSerifHebrew-VariableFont_wdth,wght.ttf',
'Tinos': 'fonts/Tinos-Regular.ttf',
'NotoRashiHebrew': 'fonts/NotoRashiHebrew-VariableFont_wght.ttf',
'Mekorot': 'packages/otzaria_mekorot/Mekorot-Light.ttf',
'Rubik': 'fonts/Rubik-VariableFont_wght.ttf',
};

/// קובץ ה-face הבולד של גופן מובנה, למשפחות שנרשמו ב-pubspec עם קובץ נפרד.
/// צרכן חיצוני שמקבל רק את ה-regular (WebView של תוסף) מסנתז בולד מרוח.
static const Map<String, String> boldFontPaths = {
'FrankRuhlCLM': 'fonts/FrankRuehlCLM-Bold.ttf',
'Mekorot': 'packages/otzaria_mekorot/Mekorot-Bold.ttf',
ashuritFont: 'packages/otzaria_ashurit/OtzariaAshurit-Bold.otf',
ashuritNikudFont: 'packages/otzaria_ashurit/OtzariaAshuritNikud-Bold.otf',
};
Expand Down
9 changes: 9 additions & 0 deletions pubspec.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,12 @@ dependencies:
url: https://github.com/palmoni5/otzaria-ashurit.git
ref: v1.005
path: package
# גופן מקורות (Mekorot) לבחירה בהגדרות; הגרסה ננעלת ב-pubspec.lock.
otzaria_mekorot:
git:
url: https://github.com/palmoni5/mekorot.git
ref: v1.3.0
path: package
# ed25519 לאימות עדכוני מסדים מצורפים — Dart טהור, בלי תלויות.
pinenacl: ^0.6.0
path: ^1.9.1
Expand Down Expand Up @@ -483,6 +489,11 @@ flutter:
- family: NotoRashiHebrew
fonts:
- asset: fonts/NotoRashiHebrew-VariableFont_wght.ttf
- family: Mekorot
fonts:
- asset: packages/otzaria_mekorot/Mekorot-Light.ttf
- asset: packages/otzaria_mekorot/Mekorot-Bold.ttf
weight: 700
- family: TaameyDavidCLM
fonts:
- asset: fonts/TaameyDavidCLM-Medium.ttf
Expand Down
13 changes: 11 additions & 2 deletions test/theme/fonts_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,17 @@ import 'package:otzaria/theme/app_fonts.dart';
import 'package:otzaria/utils/file/sfnt_metadata_reader.dart';
import 'package:otzaria/widgets/misc/font_dropdown_field.dart';

Uint8List _bundledFont(String name) =>
Uint8List.fromList(File('fonts/$name').readAsBytesSync());
import '../support/shaper_test_init.dart';

/// גופן מהתיקייה fonts, או מחבילת otzaria_mekorot כשאינו שם.
Uint8List _bundledFont(String name) {
final local = File('fonts/$name');
if (local.existsSync()) return Uint8List.fromList(local.readAsBytesSync());
final mekorot = resolvedTestPackageRoot('otzaria_mekorot')!;
return Uint8List.fromList(
File('${mekorot.path}/lib/$name').readAsBytesSync(),
);
}

// ---------------------------------------------------------------------------
// Helpers — build minimal valid OpenType/TrueType byte sequences
Expand Down
Loading