# liblouis: Persian  Grade 1 Braille table
#
# -----------
#-index-name: Persian
#-display-name: Persian braille
#
#+language:fa
#+type:literary
#+contraction:no
#+grade:1
# Marked as "direction:forward" by Bue Vester-Andersen
# as tests only run forward.
#+direction:forward
#
# TODO: Please correct the metadata above. It is not meant to be
# accurate nor complete. It hasn't been verified by the table
# author yet. It is merely an attempt by the liblouis maintainers
# to get some sensible initial values in place.
#
# TODO: Please add a reference to official documentation about
# the implemented braille code. Preferably submit the documents
# to https://github.com/liblouis/braille-specs.
# -----------
#
# Copyright (C) 2011 by Mesar Hameed <mesar.hameed@gmail.com>
# Copyright (C) 2011 by Abdolamir Banisaeid <saedjan at gmail.com>
# Copyright (C) 2016 by Mohammadreza Rashad <mohammadreza5712@gmail.com>
#
#  This file is part of liblouis.
#
#  liblouis is free software: you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as
#  published by the Free Software Foundation, either version 2.1 of the
#  License, or (at your option) any later version.
#
#  liblouis is distributed in the hope that it will be useful, but
#  WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
#  Lesser General Public License for more details.
#
#  You should have received a copy of the GNU Lesser General Public
#  License along with liblouis. If not, see
#  <http://www.gnu.org/licenses/>.

# Fixed some conflicts in Persian Braille script and added
# Persian-specific signs which weren't available in previous table.

space \x200C 8
space \x00a0 a
include spaces.uti

include braille-patterns.cti # unicode braille.

# ----------- define all chars --------------------------------------

punctuation ! 235
punctuation " 58
sign # 3456
sign $ 4-234
sign % 25-1234
sign & 123468
punctuation ' 3
punctuation ) 2356
punctuation ( 2356
sign * 246-135
math + 56-235
punctuation , 2
punctuation - 36
punctuation \x06D4 256
punctuation . 256
math / 348
punctuation : 25
punctuation ; 23
sign \x061B 23
math < 246
math = 56-2356
math > 135
punctuation ? 236
sign @ 4
punctuation [ 6-236
sign \\ 12568
punctuation ] 356-3
sign ^ 3468
sign _ 78
sign ` 48
punctuation { 5-236
sign | 4568-1237
punctuation } 356-2
math ~ 45
sign \x00A2 4-14
sign \x00A3 4-123
sign \x00A5 4-13456
sign \x00A7 4-234-3
sign \x00A9 147-7
sign \x00AB 236
sign \x00AE 12357-7
punctuation \x00Ad 367
sign \x00B0 3568
sign \x00B5 46-134
sign \x00B6 4-1234-345
sign \x00BB 356
sign \x00BF 236
math \x00D7 56-236
math \x00F7 56-256
punctuation \x2010 368
punctuation \x2011 36-3
punctuation \x2013 6-36
punctuation	\x2018 236
punctuation	\x2019 356
punctuation	\x201C 6-12356
punctuation	\x201D 23456-3
punctuation	\x201E 123567
punctuation	\x201F 234568
punctuation \x2026 3-3-3
sign \x20AC 4-15
sign \x25CF 134678
math \x2212 56-36 (−)
sign \x2022 358 (•)
sign \x25E6 3578 (◦)
sign \x25FE 35678 (◾)

# English letters

uppercase A 17
uppercase B 127
uppercase C 147
uppercase D 1457
uppercase E 157
uppercase F 1247
uppercase G 12457
uppercase H 1257
uppercase I 247
uppercase J 2457
uppercase K 137
uppercase L 1237
uppercase M 1347
uppercase N 13457
uppercase O 1357
uppercase P 12347
uppercase Q 123457
uppercase R 12357
uppercase S 2347
uppercase T 23457
uppercase U 1367
uppercase V 12367
uppercase W 24567
uppercase X 13467
uppercase Y 134567
uppercase Z 13567
lowercase a 18
lowercase b 128
lowercase c 148
lowercase d 1458
lowercase e 158
lowercase f 1248
lowercase g 12458
lowercase h 1258
lowercase i 248
lowercase j 2458
lowercase k 138
lowercase l 1238
lowercase m 1348
lowercase n 13458
lowercase o 1358
lowercase p 12348
lowercase q 123458
lowercase r 12358
lowercase s 2348
lowercase t 23458
lowercase u 1368
lowercase v 12368
lowercase w 24568
lowercase x 13468
lowercase y 134568
lowercase z 13568

# -------------------------- Arabic and Persian letters and symbols ---------------------------------

sign \x060C 2
sign \x061B 23
sign \x061F 236
sign \x0621 3
sign \x0622 345
sign \x0623 34
sign \x0624 1256
sign \x0625 34
sign \x0626 13456
sign \x0627 1
sign \x0628 12
sign \x067E 1234
sign \x0629 16
sign \x062A 2345
sign \x062B 1456
sign \x062C 245
sign \x0686 14
sign \x062D 156
sign \x062E 1346
sign \x062F 145
sign \x0630 2346
sign \x0631 1235
sign \x0632 1356
sign \x0698 346
sign \x0633 234
sign \x0634 146
sign \x0635 12346
sign \x0636 1246
sign \x0637 23456
sign \x0638 123456
sign \x0639 12356
sign \x063A 126
sign \x0640 6-3
sign \x0641 124
sign \x0642 12345
sign \x0643 13
sign \x06A9 13
sign \x06AF 1245
sign \x0644 123
sign \x0645 134
sign \x0646 1345
sign \x0648 2456
sign \x0647 125
sign \x064A 24
sign \x06CC 24
sign \x0649 135
sign \x064E 2
sign \x0650 15
sign \x064F 136
sign \x064B 23
sign \x064D 35
sign \x064C 26
sign \x0651 6
sign \x0652 25
sign \xFDFC 4-1235
sign \x066A 25-1234
sign \x066B 2
sign \x066C 3

# --------------------------- end definitions ---------------------------------

# include countries.cti


# Braille indicators

emphclass italic
emphclass underline
emphclass bold

begemph italic 46-46
endemph italic 46
begemph bold 456-456
endemph bold 4568
begemph underline 78-78
endemph underline 78

numsign 3456  number sign, just a dots operand
begnum # 3456-4 print number sign before number
midnum , 3
midnum ٬ 3

# the decimal digits
include digits6Dots.uti

# Arabic numerals

digit \x0660 245
digit \x0661 1
digit \x0662 12
digit \x0663 14
digit \x0664 145
digit \x0665 15
digit \x0666 124
digit \x0667 1245
digit \x0668 125
digit \x0669 24

# Persian numerals

digit \x06F0 245
digit \x06F1 1
digit \x06F2 12
digit \x06F3 14
digit \x06F4 145
digit \x06F5 15
digit \x06F6 124
digit \x06F7 1245
digit \x06F8 125
digit \x06F9 24

# punctuation

prepunc ) 2356
postpunc ( 2356
prepunc " 57
postpunc " 58
prepunc ' 2367
postpunc ' 3567
postpunc , 2
decpoint . 2
decpoint ٫ 2
midnum - 36
hyphen - 36
postpunc . 256
postpunc ; 23
postpunc : 25
postpunc ! 235
postpunc ? 236
endnum % 25-1234
prepunc ` 48
always ... 3-3-3

