-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
357 lines (307 loc) · 10.3 KB
/
index.html
File metadata and controls
357 lines (307 loc) · 10.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Arabic Support Guide</title>
</head>
<style>
@font-face {
font-family: NotoSans;
src: url(NotoSans.ttf);
font-weight: 800;
font-size: 24px;
}
@font-face {
font-family: NotoSansArabic;
src: url(NotoSansArabic.ttf);
font-weight: 800;
}
:root {
--lightest : #ffffff;
--dark : #6b6c6d;
--darker : #414344;
--darkest : #1f2122;
}
html {
font-family: NotoSans, NotoSansArabic;
color: var(--lightest);
background-color: var(--darkest);
scroll-behavior: smooth;;
}
a {
color: var(--lightest);
}
.navbar {
position: fixed;
background-color: var(--darker);
/* margin: -8px; */
top: 0px;
left: 0px;
width: 100%;
height: 64px;
box-shadow: 0px 4px 4px rgb(0, 0, 0, 25%);
align-content: center;
text-align: center;
text-wrap: nowrap;
z-index: 100;
}
.centered {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, 50%);
}
.navbar a {
color: var(--lightest);
padding: 16px;
text-decoration: none;
text-align: center;
}
.navbar a:hover {
background-color: var(--dark);
}
.navbar select {
position: absolute;
top: 6px;
right: 1rem;
color: var(--lightest);
font-family: NotoSans, NotoSansArabic;
font-size: 18px;
background: none;
border: none;
height: 54px;
}
.navbar select:hover {
background-color: var(--dark);
}
.navbar select option {
font-family: NotoSans, NotoSansArabic;
font-size: 18px;
background: none;
border: none;
background-color: var(--dark);
}
.web-content {
display: flex;
flex-wrap: wrap;
flex-flow: column;
text-align: center;
align-items: center;
}
h1 {
font-size: 24px;
}
p {
font-size: 22px;
}
.normal-space {
margin: 16px;
}
.large-space {
margin: 64px;
}
.block {
background-color: var(--darker);
border-radius: 16px;
box-shadow: 8px 8px 4px rgb(1, 1, 1, 0.25);
display: flex;
justify-content: center;
}
.large-block-size {
width: 960px;
height: 480px;
flex-wrap: wrap;
flex-direction: column;
display: flex;
}
.normal-block-size {
width: 576px;
height: 256px;
padding: 64px;
flex-wrap: wrap;
flex-direction: column;
display: flex;
}
.small-block-size {
width: 960px;
height: 270px;
flex-wrap: wrap;
flex-direction: column;
display: flex;
}
.frame-left {
background-color: var(--dark);
top: 0px;
left: 0px;
border-radius: 16px 0px 0px 16px;
position: relative;
z-index: 1;
width: 248px;
height: 270px;
flex-direction: column;
flex-wrap: wrap;
display: flex;
justify-content: center;
}
.frame-right {
background-color: var(--dark);
top: 0px;
right: 0px;
border-radius: 0px 16px 16px 0px;
position: relative;
z-index: 1;
width: 248px;
height: 270px;
flex-direction: column;
flex-wrap: wrap;
display: flex;
justify-content: center;
}
.seperator {
background-color: var(--lightest);
width: 1024px;
height: 4px;
margin-top: 64px;
}
</style>
<body>
<div class="navbar">
<a href="#RightToLeft">• Right To Left</a>
<a href="#RightCharacters">• Right Characters</a>
<a href="#RightGrammar">• Right Grammar</a>
<select>
<option value="EN">English</option>
<option value="AR">Arabic</option>
</select>
</div>
<div class="web-content">
<h1 class="normal-space" style="margin-top: 8rem;">
- Main points to consider when adding Arabic support :
</h1>
<img id="RightToLeft" class="block normal-block-size normal-space" src="Title.svg">
<h2 style="max-width: 1024px; margin-top: 8rem;">
Most languages are written from left-to-right. However, the same rule doesn’t apply on Arabic. Here’s Some common mistakes when trying to add the Arabic support:
</h2>
<div class="block small-block-size normal-space">
<div class="frame-left">
<img src="Arrow1.svg" style="margin-top: 32px; margin-left: 190px;">
<img src="AssalamuAlaikum-Correct.svg" style="margin-top: -8px;">
<img src="Arrow2.svg" style="margin-right: 175px;">
<img src="PeaceBeUponYou.svg" style="margin-top: -20px;">
</div>
<p style="width: 640px;">
as you can see, the arrow explains from where the typing started and the direction of it.
<br>
<br>
Arabic Typing Direction is from Right-to-Left instead of Left-to-Right as in English.
</p>
</div>
<div class="block small-block-size normal-space">
<p style="width: calc(100% - 248px);">
Try to display “ السلام عليكم ” in your program.
<br>
<br>
If you see something like this, then there’s
<br>
a problem with the text algorithm in your program
</p>
<div class="frame-right">
<img src="AssalamuAlaikum-Incorrect1.svg">
</div>
</div>
<div class="block small-block-size normal-space">
<p style="width: calc(100% - 248px);">
Another shape could appear to you is this.
<br>
<br>
This result with wrong direction and wrong characters shape
<br>
(we will get into that in a bit)
</p>
<div class="frame-right">
<img src="AssalamuAlaikum-Incorrect2.svg">
</div>
</div>
<h2 class="large-space" style="width: max-content;">
Some resources to recommend for this issue is: <a href="https://github.com/unicode-org/icu">ICU</a>, <a href="https://github.com/fribidi/fribidi">GNU FriBidi</a>
<br>
These Libraries can help you with (BiDirectional text support) which allows you to type from right to left.
</h2>
<div id="RightCharacters" class="seperator">
</div>
<h2 class="large-space">
Characters in Arabic don’t act as the characters in Latin-Languages.
<br>
So there’s another thing to consider when adding Arabic Support.
</h2>
<div class="block large-block-size normal-space">
<div class="frame-left" style="height: 100%;">
<img src="CharactersForms 1.svg">
</div>
<p style="width: 696px;">
Each character have variations that depend on its position in the word.
<br>
<br>
Let’s take the character “ س ” as an example.
<br>
<br>
It’s shape in the beginning of the word is “ سـ ” as in “ سالم ”.
<br>
in the middle “ ـسـ ” as in “ مسلم ”.
<br>
at the end “ ـس ” as in “ ملابس ”.
<br>
<br>
if its not connected to any other character it will be typed as it is “ س ” as in “ قندس ”.
</p>
</div>
<h2 style="width: max-content;">
This can be confusing for some people. This <a href="https://en.wikipedia.org/wiki/Arabic_script_in_Unicode">resource</a> can help understand it better.
</h2>
<div class="block small-block-size normal-space">
<p style="width: calc(100% - 248px);">
After implementing Bidirectional text.
<br>
Try displaying “ السلام عليكم ” again.
<br>
if you got something like this instead of the correct one above.
<br>
Then you didn’t implement the correct character shape.
</p>
<div class="frame-right">
<img src="AssalamuAlaikum-Incorrect3.svg">
</div>
</div>
<h2>
<a href="https://harfbuzz.github.io/">HarfBuzz</a> is a great library for text shaping.
<br>
so Implementing it will solve this issue.
</h2>
<div id="RightGrammar" class="seperator">
</div>
<h2 class="large-space" style="width: max-content;">
Finally, Arabic is a language after all. So spelling is needed to create an understandable
<br>
healthy sentence. And here’s some common mistakes with the grammar in Arabic.
</h2>
<img src="Table.svg">
<h2>
there’s a lot more..
</h2>
<h2 class="large-space" style="width: max-content;">
We Arabic-Speakers sometimes struggle with it so it’s no-brainier you will too.
<br>
So This website can help you to reduce this issue with the most rate. Called <a href="https://sahehly.com/">Sahehly</a>.
</h2>
<h2 class="large-space">
you can contribute to this website on <a href="https://github.com/3booodpro/ArabicSupportGuide">github</a>.
</h2>
</div>
<div class="block" style="box-shadow: 0px -8px 4px rgb(1, 1, 1, 0.25); border-radius: 16px 16px 0px 0px; bottom: 0; left: 0; margin-bottom: -8px; padding: 0px; width: 100%; height: 64px;">
<p>
Made by Abdulwahab Najib (aka 3boood_pro)
</p>
</div>
</body>
</html>