Bug 1908931 - Add hyphenation patterns for Czech & Slovak. r=layout-reviewers,emilio

The same patterns are used for both languages, so we just add a single copy
under the `hyph_cs` name, and then use a hyphenation-alias pref to apply
the same rules to `sk` as well.

Differential Revision: https://phabricator.services.mozilla.com/D217751
This commit is contained in:
Jonathan Kew
2024-07-26 07:46:16 +00:00
parent cf99004d96
commit 245d806dd6
10 changed files with 9986 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
License information for hyph_cs.dic
-----------------------------------
This file is extracted directly from
https://github.com/tensojka/cshyphen/blob/master/csskhyphen.pat
(as of 2024-07-25), which has the following license header:
% Authors: Petr Sojka <sojka@fi.muni.cz>, Ondrej Sojka <454904 (at) mail.muni.cz>
%
% Version: 2021-07-21
% Czechoslovak hyphenation patterns
% Generated with correct optimized parameters (cs-sojka-correctoptimized.par)
% For further information, see TUGboat issue with proceedings of TUG 2021
% For source code, see github.com/tensojka/cshyphen
%
%
% MIT License
% Copyright (c) 2019 Sojka
% Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
% The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@@ -17,6 +17,7 @@ locales = [
"bg",
"bn",
"ca",
"cs",
"cy",
"da",
"de-1901",

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<div style="font-size:9px; width:0; hyphens:manual;" lang="cs">
Všichni li&shy;dé ro&shy;dí se svo&shy;bod&shy;ní a so&shy;bě rov&shy;ní co do dů&shy;s&shy;toj&shy;no&shy;s&shy;ti a práv. Jsou na&shy;&shy;ni ro&shy;zu&shy;mem a svě&shy;do&shy;mím a ma&shy;jí spo&shy;lu jed&shy;nat v du&shy;chu bra&shy;tr&shy;ství.
</div>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<div style="font-size:9px; width:0; hyphens:auto;" lang="cs">
Všichni lidé rodí se svobodní a sobě rovní co do důstojnosti a práv. Jsou nadáni rozumem a svědomím a mají spolu jednat v duchu bratrství.
</div>
</body>
</html>

View File

@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<div style="font-size:9px; width:0; hyphens:manual;" lang="sk">
Všetci ľu&shy;dia sa ro&shy;dia slo&shy;bod&shy;ní a se&shy;be rov&shy;ní, v ich dô&shy;s&shy;toj&shy;no&shy;s&shy;ti a prá&shy;vach.
Sú ob&shy;da&shy;re&shy;ní ro&shy;zu&shy;mom a sve&shy;do&shy;mím a ma&shy;jú na&shy;vzá&shy;jom ko&shy;nať v du&shy;chu brat&shy;st&shy;va.
</div>
</body>
</html>

View File

@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<div style="font-size:9px; width:0; hyphens:auto;" lang="sk">
Všetci ľudia sa rodia slobodní a sebe rovní, v ich dôstojnosti a právach.
Sú obdarení rozumom a svedomím a majú navzájom konať v duchu bratstva.
</div>
</body>
</html>

View File

@@ -245,6 +245,7 @@ pref(gfx.font_rendering.graphite.enabled,true) == glyph-decomposition-graphite.h
== auto-hyphenation-af-1.html auto-hyphenation-af-1-ref.html
== auto-hyphenation-bg-1.html auto-hyphenation-bg-1-ref.html
== auto-hyphenation-ca-1.html auto-hyphenation-ca-1-ref.html
== auto-hyphenation-cs-1.html auto-hyphenation-cs-1-ref.html
== auto-hyphenation-cy-1.html auto-hyphenation-cy-1-ref.html
== auto-hyphenation-da-1.html auto-hyphenation-da-1-ref.html
== auto-hyphenation-de-1901-1.html auto-hyphenation-de-1901-1-ref.html
@@ -274,6 +275,7 @@ pref(gfx.font_rendering.graphite.enabled,true) == glyph-decomposition-graphite.h
== auto-hyphenation-pt-1.html auto-hyphenation-pt-1-ref.html
== auto-hyphenation-ru-1.html auto-hyphenation-ru-1-ref.html
== auto-hyphenation-sh-1.html auto-hyphenation-sh-1-ref.html
== auto-hyphenation-sk-1.html auto-hyphenation-sk-1-ref.html
== auto-hyphenation-sl-1.html auto-hyphenation-sl-1-ref.html
== auto-hyphenation-sr-1.html auto-hyphenation-sr-1-ref.html
== auto-hyphenation-sv-1.html auto-hyphenation-sv-1-ref.html # test swedish patterns

View File

@@ -1601,6 +1601,7 @@ pref("intl.hyphenation-alias.af-*", "af");
pref("intl.hyphenation-alias.bg-*", "bg");
pref("intl.hyphenation-alias.bn-*", "bn");
pref("intl.hyphenation-alias.ca-*", "ca");
pref("intl.hyphenation-alias.cs-*", "cs");
pref("intl.hyphenation-alias.cy-*", "cy");
pref("intl.hyphenation-alias.da-*", "da");
pref("intl.hyphenation-alias.eo-*", "eo");
@@ -1642,6 +1643,10 @@ pref("intl.hyphenation-alias.as-*", "bn");
pref("intl.hyphenation-alias.mr", "hi");
pref("intl.hyphenation-alias.mr-*", "hi");
// Czech patterns are also used for Slovak
pref("intl.hyphenation-alias.sk", "cs");
pref("intl.hyphenation-alias.sk-*", "cs");
// use reformed (1996) German patterns by default unless specifically tagged as de-1901
// (these prefs may soon be obsoleted by better BCP47-based tag matching, but for now...)
pref("intl.hyphenation-alias.de", "de-1996");