Skip to content

Commit 2daba6e

Browse files
authored
Merge 7df3a5e into 2adb77c
2 parents 2adb77c + 7df3a5e commit 2daba6e

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

source/mathPres/mathPlayer.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# A part of NonVisual Desktop Access (NVDA)
33
# This file is covered by the GNU General Public License.
44
# See the file COPYING for more details.
5-
# Copyright (C) 2014-2022 NV Access Limited
5+
# Copyright (C) 2014-2023 NV Access Limited, Cyrille Bougot
66

77
"""Support for math presentation using MathPlayer 4.
88
"""
@@ -20,6 +20,7 @@
2020
from keyboardHandler import KeyboardInputGesture
2121
import braille
2222
import mathPres
23+
import config
2324

2425
from speech.commands import (
2526
PitchCommand,
@@ -68,7 +69,10 @@ def _processMpSpeech(text, language):
6869
if m.lastgroup == "break":
6970
out.append(BreakCommand(time=int(m.group("break")) * breakMulti))
7071
elif m.lastgroup == "char":
71-
out.extend((CharacterModeCommand(True), m.group("char"), CharacterModeCommand(False)))
72+
if config.conf["speech"][synth.name]["useSpellingFunctionality"]:
73+
out.extend((CharacterModeCommand(True), m.group("char"), CharacterModeCommand(False)))
74+
else:
75+
out.append(m.group("char"))
7276
elif m.lastgroup == "comma":
7377
out.append(BreakCommand(time=100))
7478
elif m.lastgroup in PROSODY_COMMANDS:

source/speech/shortcutKeys.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
import characterProcessing
1313
from logHandler import log
14+
from synthDriverHandler import getSynth
15+
import config
1416

1517
from .commands import CharacterModeCommand
1618
from .types import SpeechSequence
@@ -91,6 +93,9 @@ def _getKeySpeech(key: str) -> SpeechSequence:
9193
keySymbol = characterProcessing.processSpeechSymbol(locale, key)
9294
if keySymbol != key:
9395
return [keySymbol]
96+
synth = getSynth()
97+
if not config.conf["speech"][synth.name]["useSpellingFunctionality"]:
98+
return [key]
9499
return [
95100
CharacterModeCommand(True),
96101
key,

0 commit comments

Comments
 (0)