Page 1 of 2
Unicode and the Properties Palette
Posted: Sat Dec 12, 2020 10:36 am
by richmond62
-
My
Devawriter Pro 'thang' uses a non-standard Unicode font as it contains about 5,000 glyphs in the
Personal Private Use Area, which is "all very sexy" for people who wish to prepare digitised versions of Indic texts,
but is " a bit of a pox" for people like myself when editing code.
https://www.facebook.com/devawriter/
If the field content part of the
properties palette were give 2 possibilities life would suddenly get a whole lot better:
1. The ability to set the
font in the entry field.
2. The ability to set the
fontSize in the entry field.
Re: Unicode and the Properties Palette
Posted: Sat Dec 12, 2020 10:44 am
by richmond62
-
Mockup.

Re: Unicode and the Properties Palette
Posted: Sat Dec 12, 2020 12:57 pm
by richmond62
It is a real pain-in-the-bum that this does not render in the Properties palette:
-

- Screenshot 2020-12-12 at 13.56.18.png (4.79 KiB) Viewed 7125 times
Re: Unicode and the Properties Palette
Posted: Sat Dec 12, 2020 5:03 pm
by richmond62
I have a feeling that if I could just locate a template stack for the Properties Palette
I could edit it myself to add those features.
Re: Unicode and the Properties Palette
Posted: Sat Dec 12, 2020 8:29 pm
by richmond62
Re: Unicode and the Properties Palette
Posted: Sat Dec 12, 2020 9:37 pm
by richmond62
I wonder why is seems impossible to add new controls to this stack?
-
Re: Unicode and the Properties Palette
Posted: Sat Dec 12, 2020 9:58 pm
by richmond62
Having,
finally, worked out a way to hack this:
-
-
Having saved it as a substack of a dummy stack, there now seems no way to turn it into a mainstack
and then return it to "its place in the great scheme of things."

Re: Unicode and the Properties Palette
Posted: Sat Dec 12, 2020 10:11 pm
by richmond62
Ah: managed to swap out the old stack and swap in my modded one: and it has NO
effect on the Property Inspector at all.
Re: Unicode and the Properties Palette
Posted: Sun Dec 13, 2020 6:27 pm
by jacque
I don't know a lot about how the inspector works except that it is created and laid out dynamically. Its content varies depending on the widgets the user has installed and its own properties are set dynamically depending on the selected object. It's probably ignoring your changes because it's updating itself constantly.
A more general solution is to submit a report asking that the inspector honor unicode more faithfully.
Re: Unicode and the Properties Palette
Posted: Sun Dec 13, 2020 7:29 pm
by richmond62
Re: Unicode and the Properties Palette
Posted: Mon Dec 14, 2020 2:26 pm
by bn
Richmond,
If I understand what you want correctly you could change "com.livecode.pi.textcontents.behavior".
Handler "on editorUpdate", changes marked by "-- added BN"
To make those changes permanent in your copy of LC you would have to change to permissions of that file in the application bundle (on Mac) to allow write access. Then save the changed file from the IDE.
The change affects only that particular instance of LC, any other instance/version would have to be changed the same way.
Code: Select all
on editorUpdate
lock screen
local tValue, tEffective, tEnabled, tProp, tFieldID
put the editorValue of me into tValue
put the editorEnabled of me into tEnabled
put the editorEffective of me into tEffective
put the cSelectedObjects of me into tFieldID -- added BN
lock messages
if sTextType is "styledText" then
set the styledText of field "htmltext" of me to tValue
-- added BN
if the number of lines of tFieldID = 1 then
set the textFont of field "htmlText" of me to the effective textFont of tFieldID
end if
-- and added BN
else
put tValue into field "htmltext" of me
end if
set the enabled of field "htmltext" of me to tEnabled
if tEffective is true then
set the textcolor of field "htmltext" of me to "150,150,150"
else
set the textcolor of field "htmltext" of me to empty
end if
unlock messages
unlock screen
end editorUpdate
I did not test with your special font but see no reason why it should not work.
This change will apply the textFont of the inspected field to the Properties Inspector instance of styled text.
Please note that some fonts might not display properly in the Properties Inspector due to space restrictions (Zapfino being one font that does not display properly)
Kind regards
Bernd
Re: Unicode and the Properties Palette
Posted: Mon Dec 14, 2020 9:10 pm
by richmond62
Bernd
Thank you very much.
However, that is a stop-gap at best, and the ability to be able to see in the text entry panel in the Property Inspector
for fields as a permanent and fixed feature, especially one that can be changed on-the-fly with 2 drop-down
menus, would greatly enhance the IDE.
Re: Unicode and the Properties Palette
Posted: Mon Dec 14, 2020 10:15 pm
by bn
richmond62 wrote: ↑Mon Dec 14, 2020 9:10 pm
However, that is a stop-gap at best, and the ability to be able to see in the text entry panel in the Property Inspector
for fields as a permanent and fixed feature, especially one that can be changed on-the-fly with 2 drop-down
menus, would greatly enhance the IDE.
This is just a hack for the time being. I am reluctant to propose a full featured pull request since I think it is up to Edinburgh to decide on the features of the Properties Inspector.
Kind regards
Bernd
Re: Unicode and the Properties Palette
Posted: Tue Dec 15, 2020 12:40 pm
by richmond62
I think it is up to Edinburgh to decide on the features of the Properties Inspector.
Well, we could focus on the word 'Community' as well as various sententious pronouncements from LC central
and, apart from looking at our navels and intoning "Runtime Revolution" 108 times, ask ourselves how much
of this decision making should be their's (OK, OK, the Buck stops with Kevin and Mark), and how much should,
or could be our's.
Of course this is a bit like gambling on whether Vishnu is actually listening (or even exists) as there have been extremely
sparse indications from LC central as to how much the 'Community' should 'get-down-and-dirty'.
As I threw my juju beads away a very, very long time ago (1982) . . . .
Because of this sparsity (err: is that a real word? or should I use 'paucity' instead?) of "signs and wonders" (um; possibly extending the
metaphor a bit too far) I for one am reluctant to get my boots too wet and muddy.
Should you feel that what I have suggested is a good thing, pop over to the bug/enhancement report and give it a virtual thumbs up.
Re: Unicode and the Properties Palette
Posted: Tue Dec 15, 2020 6:38 pm
by jacque
Well, we could focus on the word 'Community' as well as various sententious pronouncements from LC central
LC encourages community contributions; in fact, that was one of the reasons to go open source. I believe they expected more involvement than they received. A compatible update to the inspector would be welcomed, I'm sure.
Kudos to the handful of people who actually jump in to help.