emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EWW: Face property changes around newlines


From: T.V Raman
Subject: Re: EWW: Face property changes around newlines
Date: Wed, 09 Jan 2019 07:01:02 -0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:


Hi Stefan --

Here is the problem; it's not that easy from the emacspeak side -- see
below.

Emacspeak uses the following algorithm to split text into chunks before
sending to the TTS engine.

1. Split by clauses -- where "clause" is determined by the buffer's
syntax table.

2. Next, split the clause into chunks based on property changes -- since
"changing voice params on any TTS engine triggres a clause boundary.
3. (2) is achieved by calling next-single-property-change

4. Result -- in EWW buffers, next-single-property-change always goes to
the newline  char when on text that isn't otherwise decorated
i.e. variable-pitch->nil for the 'face property.

For now I discovered the shr-use-fonts option and turned it off --- that
appears to fix my problem in large part. 

>> EWW appears to work differently -- if you take a plain paragraph that
>> spans multiple lines, the text uses "variable-pitch" as  the face
>> property -- except that that property is not set on the newline
>> characters within the paragraph.
>
> I'm not sure how hard/easy it may be to change SHR (used by EWW) to do
> that, but I have the impression that it may be non-trivial.
>
>> I'm sure this makes no visible difference to the layout -- but it
>> affects Emacspeak's logic for breaking content into meaningful
>> clauses.
>
> Maybe it would be simpler to change Emacspeak so it ignores face
> properties on whitespace?
>
>
>         Stefan
>
>

-- 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]