Skip to content

Commit

Permalink
Added Braille support
Browse files Browse the repository at this point in the history
  • Loading branch information
jnaskali committed May 30, 2022
1 parent fef67f3 commit 1394c15
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions font-patcher
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ class font_patcher:
sym_font_group.add_argument('--powerlineextra', dest='powerlineextra', default=False, action='store_true', help='Add Powerline Glyphs (https://github.com/ryanoasis/powerline-extra-symbols)')
sym_font_group.add_argument('--material', '--materialdesignicons', '--mdi', dest='material', default=False, action='store_true', help='Add Material Design Icons (https://github.com/templarian/MaterialDesign)')
sym_font_group.add_argument('--weather', '--weathericons', dest='weather', default=False, action='store_true', help='Add Weather Icons (https://github.com/erikflowers/weather-icons)')
sym_font_group.add_argument('--braille', dest='braille', default=False, action='store_true', help='Add Braille Glyphs')

self.args = parser.parse_args()

Expand All @@ -202,6 +203,7 @@ class font_patcher:
self.args.powerlineextra = True
self.args.material = True
self.args.weather = True
self.args.braille = True

if not self.args.complete:
# add the list of arguments for each symbol font to the list self.sym_font_args
Expand Down Expand Up @@ -274,6 +276,10 @@ class font_patcher:
if self.args.weather:
additionalFontNameSuffix += " WEA"
verboseAdditionalFontNameSuffix += " Plus Weather Icons"
if self.args.braille:
additionalFontNameSuffix += " B"
verboseAdditionalFontNameSuffix += " Plus Braille Icons"


# if all source glyphs included simplify the name
else:
Expand Down Expand Up @@ -609,6 +615,7 @@ class font_patcher:
{'Enabled': self.args.octicons, 'Name': "Octicons", 'Filename': "octicons.ttf", 'Exact': self.octiconsExactEncodingPosition, 'SymStart': 0X26A1, 'SymEnd': 0X26A1, 'SrcStart': None, 'SrcEnd': None, 'ScaleGlyph': OCTI_SCALE_LIST, 'Attributes': SYM_ATTR_DEFAULT}, # Zap
{'Enabled': self.args.octicons, 'Name': "Octicons", 'Filename': "octicons.ttf", 'Exact': self.octiconsExactEncodingPosition, 'SymStart': 0xF27C, 'SymEnd': 0xF27C, 'SrcStart': 0xF4A9, 'SrcEnd': 0xF4A9, 'ScaleGlyph': OCTI_SCALE_LIST, 'Attributes': SYM_ATTR_DEFAULT}, # Desktop
{'Enabled': self.args.codicons, 'Name': "Codicons", 'Filename': "codicons/codicon.ttf", 'Exact': True, 'SymStart': 0xEA60, 'SymEnd': 0xEBEB, 'SrcStart': None, 'SrcEnd': None, 'ScaleGlyph': None, 'Attributes': SYM_ATTR_DEFAULT},
{'Enabled': self.args.braille, 'Name': "Braille", 'Filename': "UBraille.ttf", 'Exact': False, 'SymStart': 0x2800, 'SymEnd': 0x28FF, 'SrcStart': None, 'SrcEnd': None, 'ScaleGlyph': None, 'Attributes': SYM_ATTR_DEFAULT},
{'Enabled': self.args.custom, 'Name': "Custom", 'Filename': self.args.custom, 'Exact': True, 'SymStart': 0x0000, 'SymEnd': 0x0000, 'SrcStart': 0x0000, 'SrcEnd': 0x0000, 'ScaleGlyph': None, 'Attributes': CUSTOM_ATTR}
]

Expand Down
Binary file added src/glyphs/UBraille.ttf
Binary file not shown.

0 comments on commit 1394c15

Please sign in to comment.