# liblouis: International Phonetic Alphabet

# Copyright (C) 2016 by Ludovic Oger <oger.ludovic@gmail.com>
# Copyright (C) 2025 by RNIB <www.rnib.org.uk>
# Copyright (C) 2025 by Robert Englebretson

#  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/>.

#-display-name: International Phonetic Alphabet braille
#-index-name: International Phonetic Alphabet

#+language: *-fonipa
#+dots: 6

# This table contains braille codes for a part of the International Phonetic Alphabet (IPA, 2005).
# WARNING! The IPA symbols in this table might conflict with other tables. (e.g. conflict: θ
#          (Unicode 03B8) is the greek letter theta, french braille code is different between greek
#          and phonetic)
# WARNING! This table is not intended to be included in other tables. The symbol definitions that
#          are safe to include in other tables are collected in IPA-unicode-range.uti.


# --------REFERENCES--------
#   - IPA Braille: An Updated Tactile Representation of the International Phonetic Alphabet
#     Print Edition
#     Edited by Robert Englebretson, Ph.D.
#     Produced by CNIB
#     For the International Council on English Braille - 2008
#     <http://www.iceb.org/icebipa.htm>
#     (this reference document is reprinted in 'World Braille Usage - Third Edition - 2013 - Copyright (C) 1954, 1990 UNESCO')
#
#   - "IPA Chart, http://www.internationalphoneticassociation.org/content/ipa-chart,
#      available under a Creative Commons Attribution-Sharealike 3.0 Unported License.
#      Copyright (C) 2015 International Phonetic Association."


#--------NOTES--------
# This table includes:
#   - Symbols defined in IPA-unicode-range.uti
#   - Characters include in latinLetterDef6Dots.uti table (a, b, c...). 
#   - Some current symbols (e.g. point '.')
#   - 'Phonetic and Phonemic Enclosures'
# Some lines are commented for reference:
#   - Tricky character compositions, see end of 'Tones and Word Accents'
# Some IPA unicode symbols are not present in the reference document so there is no braille equivalent.
#   Example: \x02D4 for 'MODIFIER LETTER UP TACK',
#            see <http://unicode.org/cldr/utility/list-unicodeset.jsp?a=\p{subhead=Miscellaneous%20phonetic%20modifiers}>


# Last updated on January 16, 2025

# Definitions of spaces
include spaces.uti

# IPA symbols that do not conflict with other tables
include IPA-unicode-range.uti
sign \x032C 6-236       # ̬  - wedge below - voiced
sign \x032F 6-23456     # ̯  - arch below - non-syllabic
sign \x2016 456-123456  # ‖ - double vertical line - major (intonation) group
sign \x2197 456-145     # ↗ - upward diagonal arrow - global rise
sign \x2198 456-356     # ↘ - downward diagonal arrow - global fall
sign \xF19C 456-1246    #  - up arrow - upstep
sign \x2193 456-2346    # ↓ - down arrow - downstep
sign \x2191 456-1246    # ↑ - up arrow - upstep

#--------PULMONIC CONSONANTS--------
# UNICODE DOTS          # GLYPH - TYPOGRAPHIC DESC. - ARTICULATORY DESC.
sign \x0070 1234        # p - lowercase p - voiceless bilabial plosive
sign \x0062 12          # b - lowercase b - voiced bilabial plosive
sign \x0074 2345        # t - lowercase t - voiceless alveolar plosive
sign \x0064 145         # d - lowercase d - voiced alveolar plosive
sign \x0063 14          # c - lowercase c - voiceless palatal plosive
sign \x006B 13          # k - lowercase k - voiceless velar plosive
sign \x0067 1245        # g - lowercase g - voiced velar plosive (alternate glyph)
sign \x0071 12345       # q - lowercase q - voiceless uvular plosive
sign \x006D 134         # m - lowercase m - voiced bilabial nasal
sign \x006E 1345        # n - lowercase n - voiced alveolar nasal
sign \x0072 1235        # r - lowercase r - voiced alveolar trill
sign \x2C71 235-1236    # ⱱ (UTF-16) - right-hook v - labiodental flap
sign \xF25F 235-1236    #  (UTF-16) - right-hook v - labiodental flap
sign \x03B2 46-12       # β - beta - voiced bilabial fricative (WARNING: greek letter)
sign \x0066 124         # f - lowercase f - voiceless labiodental fricative
sign \x0076 1236        # v - lowercase v - voiced labiodental fricative
sign \x03B8 46-1456     # θ - theta - voiceless dental fricative (WARNING: greek letter)
sign \x0073 234         # s - lowercase s - voiceless alveolar fricative
sign \x007A 1356        # z - lowercase z - voiced alveolar fricative
sign \x00E7 235-14      # ç - c cedilla - voiceless palatal fricative
sign \x0078 1346        # x - lowercase x - voiceless velar fricative
sign \x03C7 46-12346    # χ - chi - voiceless uvular fricative (WARNING: greek letter)
sign \x0068 125         # h - lowercase h - voiceless glottal fricative
sign \x006A 245         # j - lowercase j - voiced palatal approximant
sign \x006C 123         # l - lowercase l - voiced alveolar lateral approximant


#--------OTHER PULMONIC CONSONANTS--------
# UNICODE DOTS          # GLYPH - TYPOGRAPHIC DESC. - ARTICULATORY DESC.
sign \x0077 2456        # w - lowercase w - voiced labial-velar approximant


#--------VOWELS--------
# UNICODE DOTS          # GLYPH - TYPOGRAPHIC DESC. - ARTICULATORY DESC.
sign \x0069 24          # i - lowercase i - close front unrounded vowel
sign \x0065 15          # e - lowercase e - close-mid front unrounded vowel
sign \x0061 1           # a - lowercase a - open front unrounded vowel
sign \x006F 135         # o - lowercase o - close-mid back rounded vowel
sign \x0075 136         # u - lowercase u - close back rounded vowel
sign \x0079 13456       # y - lowercase y - close front rounded vowel
sign \x00F8 1256        # ø - slashed o - close-mid front rounded vowel
sign \x0153 246         # œ - lowercase o-e ligature - open-mid front rounded vowel
sign \x00E6 146         # æ - ash - near-open front unrounded vowel

# Non-IPA Symbols for Postalveolar Fricatives and Affricates
# Americanist tradition, still widely used in the phonetic/phonemic transcription of First Nations/indigenous languages, also widely used in ESL/EFL materials
# these are the precomposed characters; can also be achieved by using the combining hacek diacritic
sign \x0161 234-4-236     # š - s wedge - voiceless postalveolar fricative
sign \x017E 1356-4-236    # ž - z wedge - voiced postalveolar fricative
sign \x010D 14-4-236      # č - c wedge - voiceless postalveolar affricate
sign \x01F0 245-4-236     # ǰ - j wedge - voiced postalveolar affricate

# Non-IPA Symbols for Ligatured Affricates
#These are the precomposed characters still used in some publications; equivalent to using the individual characters with the tie bar diacritic
noback sign \x02A6 2345-5-234        # ʦ - t-s ligature - voiceless alveolar affricate
noback sign \x02A3 145-5-1356        # ʣ - d-z ligature - voiced alveolar affricate
noback sign \x02A7 2345-5-156        # ʧ - t-esh ligature - voiceless postalveolar affricate
noback sign \x02A4 145-5-2346        # ʤ - d-ezh ligature - voiced postalveolar affricate
noback sign \x02A8 2345-5-236-14     # ʨ - t-curly-tail-c ligature - voiceless alveolopalatal affricate
noback sign \x02A5 145-5-236-1356    # ʥ - d-curly-tail-z ligature - voiced alveolopalatal affricate

#--------SUPRASEGMENTALS--------
# UNICODE DOTS          # GLYPH - TYPOGRAPHIC DESC. - ARTICULATORY DESC.
sign \x002E 3           # . - full stop - syllable break
sign \x007C 456-1256    # | - vertical line - minor (foot) group
sign \x002C 2           # , - comma - pause/comma
sign \x002D 36          # - - hyphen (dash) - morpheme break/hyphen
sign \x2192 456-135     # → - rightward arrow - rewrite arrow (is realized as)


#--------TONES AND WORD ACCENTS--------
# UNICODE DOTS          # GLYPH - TYPOGRAPHIC DESC. - ARTICULATORY DESC.
#   (https://en.wikipedia.org/wiki/Tone_letter)
always \x02E9\x02E5 456-34 # ˩˥ - rising (15) tone bar - rising contour tone
always \x02E9\x02E7 456-35 # ˩˧ - low-rising (13) tone bar - low-rising contour tone
always \x02E7\x02E5 456-24 # ˧˥ - high-rising (35) tone bar - high-rising contour tone
always \x02E5\x02E9 456-16 # ˥˩ - falling (51) tone bar - falling contour tone
always \x02E8\x02E5\x02E8 456-256 # ˨˥˨ - rising-falling (151) tone bar - rising-falling contour tone

#--------PHONETIC AND PHONEMIC ENCLOSURES--------
sign \x005B 45-12356    # [ - left square bracket - begin phonetic transcription
sign \x005D 45-23456    # ] - right square bracket - end phonetic transcription
sign \x002F 45-34       # / - slash - begin/end phonemic transcription
