ICONS

A place to discuss and plan OpenSource xTalk (not exclusively LCC based)
and Community Builds of LCC ...Ask NOT what xTalk can do for you...
Get involved you DO have something to contribute, no matter your skillset!

Forum rules
A place to discuss and plan OpenSource xTalk (not exclusively LCC based) and Community Builds of LCC
Ask NOT what xTalk can do for you... get involved you DO have something to contribute, no matter your skillset!
User avatar
richmond62
Posts: 2617
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: ICONS

Post by richmond62 »

Why not install Fontforge on your machine and "get down and dirty"?

https://fontforge.org/en-US/
https://richmondmathewson.owlstown.net/
User avatar
richmond62
Posts: 2617
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: ICONS

Post by richmond62 »

Here's something that is rather fun.
Attachments
MetaCard Menu Bar.rev.zip
(256.08 KiB) Downloaded 527 times
https://richmondmathewson.owlstown.net/
User avatar
OpenXTalkPaul
Posts: 1485
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: ICONS

Post by OpenXTalkPaul »

richmond62 wrote: Thu Jan 06, 2022 8:31 am Here's something that is rather fun.
I have spent some time looking at these MetaCard historical documents, certainly fun to dissect and more than that I think it could be useful in many ways in understanding the history of how things evolved in this would-be xTalk 'revolution'. I missed this at the time because I was busy doing other things, like still using HyperCard, Applscripting, ApplscriptObjC, learning some JS, etc... if they had done any marketing back when/ever it certainly didn't reach this member of the target audience (I didn't get into LC until I read somewhere that they had done a funding campaign to go open source and saw mention of HyperCard, probably just in the comments section).

I was actually considering going back to LCC 6.x revTools palette (prior to it becoming "script-only" file).
It may be best to just rebuild from scratch the Tools palette as separate "classic" and "Widgets" palettes.

I've wondered from the start of Extension Builder about how, if there were really going to be "A 1000 Widgets by Christmas", were they planning to handle that in the Tools palette? A scrolling list of Widgets inside a palette? No. This should be it's own palette, or at should at least be its own tab in the tools palette.

It might be interesting to try to make revTools be able to spawn instances of itself, the same way that revPropertyInspector can spawn multiple Property Inspector windows. Then each instance could be customizable, allowing the IDE user to build their own palettes setup however they like (one of the things Adobe does very well IMO), saving the workspace layouts to the IDE prefs file.

I'd like to see 1000 widgets by next Christmas or even any time ever. To that end, I've changed the metadata in some "_ide" widgets, which are widgets specifically used by the IDE, so that they show in with the rest of the installed widgets, which includes a widget the IDE uses for small palette header controls, color swatch widget, tile widget, icon picker, and gradient ramp editor.
User avatar
OpenXTalkPaul
Posts: 1485
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: ICONS

Post by OpenXTalkPaul »

The IDE currently uses SVG path data via the SVG Icon widget and a few other "_ide" widgets.
They're icon sets organized like a font family, the array data for each consisting of a Name, a CodePoint, and SVGPath data.
You can list the current 'font' families:

Code: Select all

put getCurrentIconFamily()
You would get a list of 2: "fontawesome" and "ide"

Code: Select all

get iconListForFamily("ide");put ArrayToJSON(it,true,true)
Put that in the message box and hit enter and you will get a list that looks like this:
"lc-add",
"lc-add-filled",
"lc-bmi-calculator",
"lc-bmi-calculator-filled",
"lc-book",
"lc-book-filled",
"lc-checkbox-checked",
"lc-checkbox-unchecked",
"lc-edit-script",
"lc-facebook",
"lc-filetype-lc",
"lc-filetype-lc-filled",
"lc-filetype-lcb",
"lc-filetype-lcb-filled",
"lc-filetype-lcs",
"lc-filetype-lcs-filled",
"lc-github",
"lc-hello-world",
"lc-hello-world-filled",
"lc-ipad-landscape",
"lc-ipad-landscape-filled",
"lc-ipad-portrait",
"lc-ipad-portrait-filled",
"lc-iphone",
"lc-iphone-filled",
"lc-learner",
"lc-learner-filled",
"lc-linkedin",
"lc-location",
"lc-location-filled",
"lc-logo",
"lc-microphone",
"lc-microphone-filled",
"lc-person",
"lc-person-filled",
"lc-stackoverflow",
"lc-talk",
"lc-talk-filled",
"lc-todo-list",
"lc-todo-list-filled",
"lc-twitter",
"lc-window",
"lc-window-filled",
"lc-youtube",
"object align bottom",
"object align horizontal center",
"object align left",
"object align right",
"object align top",
"object align vertical center",
"object justify both",
"object justify horizontal",
"object justify vertical"

We could expand on this set or start a new "oxt_ide" family.
The SVG Icons Library is called "Icon SVG Library" in the dictionary.
User avatar
richmond62
Posts: 2617
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: ICONS

Post by richmond62 »

The useful thing would be if one could export those intil a folder.

Code: Select all

on mouseUp
   get iconListForFamily("ide");put ArrayToJSON(it,true,true) into fld "eyekonz"
end mouseUp
-
SShot 2022-01-08 at 14.02.35.png
SShot 2022-01-08 at 14.02.35.png (7.47 KiB) Viewed 18365 times
-

Code: Select all

on mouseUp
   put 2 into KOUNT
   repeat until line KOUNT of fld "eyekonz" contains "["
      put line KOUNT of fld "eyekonz" into HIGHCON
      delete the first char of HIGHCON
      delete the last char of HIGHCON
    --- what the hell do we do now? 
      add 1 to KOUNT
   end repeat
end mouseUp
Attachments
Eye-Con.livecode.zip
(1.59 KiB) Downloaded 527 times
https://richmondmathewson.owlstown.net/
User avatar
richmond62
Posts: 2617
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: ICONS

Post by richmond62 »

Certainly that list is effectively useless unless we can have some sort
of idea as to what those SVG images look like.

https://fontawesome.com/download ???

Here are images of the bog-basic fontawesome fonts (but I have a funny feeling . . .):
-
SShot 2022-01-08 at 14.47.32.png
SShot 2022-01-08 at 14.47.32.png (178.04 KiB) Viewed 18360 times
-
SShot 2022-01-08 at 14.48.38.png
SShot 2022-01-08 at 14.48.38.png (158.17 KiB) Viewed 18360 times
https://richmondmathewson.owlstown.net/
User avatar
richmond62
Posts: 2617
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: ICONS

Post by richmond62 »

Aha: thought so: here is the 'fontawesome.ttf' font from inside LC 9.6.3:
-
SShot 2022-01-08 at 14.53.05.png
SShot 2022-01-08 at 14.53.05.png (267.2 KiB) Viewed 18359 times
Attachments
fontawesome.ttf.zip
(56.05 KiB) Downloaded 529 times
https://richmondmathewson.owlstown.net/
User avatar
richmond62
Posts: 2617
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: ICONS

Post by richmond62 »

And here we are in Fontforge:
-
SShot 2022-01-08 at 14.58.40.png
SShot 2022-01-08 at 14.58.40.png (15.59 KiB) Viewed 18357 times
-
Unicode range: 58880 - 58891
-
SShot 2022-01-08 at 14.58.18.png
SShot 2022-01-08 at 14.58.18.png (348.39 KiB) Viewed 18357 times
-
Unicode range: 61440 - 61922
https://richmondmathewson.owlstown.net/
User avatar
richmond62
Posts: 2617
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: ICONS

Post by richmond62 »

Frankly I feel a bit "lumpy" about HOW the 'fontawesome.ttf' font inwith LiveCode lines up with the fontawesome fonts (which
are NOT available in .ttf format) from the fontawesome website.

Personally I'd be inclined to use Fontforge to make a completely new font and fill EXACTLY the same Unicode addresses in LiveCode's
'fontawesome.ttf' with your "symbols of choice."

As Fontforge can import a wide selection of vector graphics . . .
-
SShot 2022-01-08 at 15.07.04.png
SShot 2022-01-08 at 15.07.04.png (82.46 KiB) Viewed 18356 times
-
If you feel "kinky" you can lob any SVG icons over to me and I'll roll my own font which can be released under to TOTALLY,
UTTERLY FREE licence.
https://richmondmathewson.owlstown.net/
User avatar
richmond62
Posts: 2617
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: ICONS

Post by richmond62 »

awesome.livecode.zip
(3.13 KiB) Downloaded 539 times
-
SShot 2022-01-08 at 18.40.39.png
SShot 2022-01-08 at 18.40.39.png (89.97 KiB) Viewed 18350 times
https://richmondmathewson.owlstown.net/
User avatar
OpenXTalkPaul
Posts: 1485
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: ICONS

Post by OpenXTalkPaul »

As far as I've seen The IDE uses the "Icon SVG Library" Builder Extension Library that builds arrays for SVG path data (along with "name" and "code point" key/value pairs). It does NOT use an actual font-awesome font itself (although it is included in the IDE folder as a font, it isn't used as far as I can tell).

It FontAwesome is built into an OTF (successor to TTF) font in the FontAwesome gitHub project:
https://github.com/FortAwesome/Font-Awe ... aster/otfs

The "Icon SVG Library" extension includes another set of icons, used in places like the original revStartCenter, that's called "ide" (which members do NOT have an associated code point, they're all '0'. For some reason that IDE set is also included as a "IDE Font" in the IDE folder (I still can't find anywhere in the IDE scripts where any font gets loaded).

I made a quick tool to look at the SVGPath data retrieved from Icon SVG Lib:
Screen Shot 2022-01-10 at 12.40.29 AM.png
Screen Shot 2022-01-10 at 12.40.29 AM.png (161.32 KiB) Viewed 18277 times
IconFamiliesList.oxtstack.rev.zip
(7.67 KiB) Downloaded 530 times
As you can see there are already custom made SVG Icons included in that IDE set, those can easily be substituted with a different Icon SVG path name. Icon SVG also allows for scripted creation of "icon families" in memory via handlers like "addIcon()".

The IDE set looks very much like unfinished work to me. There's only 53 icons in that IDE set, and some of those look like duplicates from the FontAwesome set. There's also IDE icons that look like they were meant to be used in the align tab of the property inspector, but then the old bitmaps images were kept instead. I like my Adobe style Align Icons better for these, perhaps I'll wind up with some hybrid. It's difficult to illustrate "distribute horizontally across card" (vs. an icon for say "distribute horizontally with gutter area") and have it look clear and understandable at 64px or 128px, even with scalable vectors on 144/288 ppi screens!

So my thinking now is that there should be something like the "SVG Icon Picker Widget", which is used by the IDE to display the FontAwesome Icon SVG Library icons (but NOT the "IDE" set, I had to make a tool for that), but a widget that is tailored for use as palettes, The SVG Icon Picker Widget is very close to being useable as a tools palette already. Perhaps we could incorporate and expand on some of the great open-source work Herman (HH) Hoch did with his IconGrid Widget. This should greatly simplify creating palettes.
User avatar
OpenXTalkPaul
Posts: 1485
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: ICONS

Post by OpenXTalkPaul »

Also need to remember we CAN actually use full color SVG Graphics with the image control via the SVG Drawing Library which only has two functions: drawingSvgCompileFile(pXmlFile) and drawingSvgCompile(pXmlText). This was added to the Engine/IDE a few years back, but does not seem to have been widely adopted by users.
https://github.com/livecode/livecode/pull/6099

At the beginning of 2018 when this library was added to the IDE (looks like there were only small engine changes involved), I made a tool to embed pre-compiled SVG Drawing data into script-only stacks (it Base64 Encodes the compiled bytecode):
https://github.com/PaulMcClernan/OpenXT ... ayLibMaker

To be clear, that is a different level of SVG support than the SVGIcon Widget which only allows for SVGpath strings to be filled or stroked via builders canvas syntax, the SVG support Drawing Library can take a full SVG file and convert it to full color drawing code and render it very quickly in a regular image control. This implementation of SVG is NOT complete though, it will just ignore SVG features ( such as text with font attributes) that it hasn't yet implemented. Having spent some considerable time converting an free/open color SVG playing cards deck to be optimized to look good with this library (as well as optimized for size in memory), I can tell you this can be a big pain in the arse!
User avatar
richmond62
Posts: 2617
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: ICONS

Post by richmond62 »

It does NOT use an actual font-awesome font itself (although it is included in the IDE folder as a font, it isn't used as far as I can tell).
Hmm . . . do you have any idea WHY the font is included in the IDE folder as a font?
https://richmondmathewson.owlstown.net/
User avatar
richmond62
Posts: 2617
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: ICONS

Post by richmond62 »

https://richmondmathewson.owlstown.net/
User avatar
OpenXTalkPaul
Posts: 1485
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: ICONS

Post by OpenXTalkPaul »

richmond62 wrote: Tue Jan 11, 2022 7:41 am
It does NOT use an actual font-awesome font itself (although it is included in the IDE folder as a font, it isn't used as far as I can tell).
Hmm . . . do you have any idea WHY the font is included in the IDE folder as a font?
I have no clue why fonts were included as fonts when they're not used in that format, I don't think it's license related.
My guess is that it was just left in there in case anyone wanted to pull more icons paths from it? Or perhaps the intended to build the IDE set into a font? Not sure, but I'm reluctant to remove it until I've finished going through everything in the IDE with fine tooth comb.

There's also Google's "SourceCode Pro" fonts are included, I guess that those are meant to be used in the Script Editor.
I'd rather trim them out and instead use monospaced fonts provided by the operating systems as the default SE fonts.

Once the entire IDE is SVG-only-graphics then all of the many image files can be removed as well. The IDE is bloated with a lot of legacy image data, which aren't very optimized for size from what I've seen.
User avatar
richmond62
Posts: 2617
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: ICONS

Post by richmond62 »

The IDE is bloated with a lot of legacy image data, which aren't very optimized for size from what I've seen.
The thing has got bigger and bigger with every version: and because of things we don't use in the IDE, which, presumably, often, get loaded into the memory at startup the whole shebang gets RAM hungrier and slower as time goes on.

The image that comes to my mind is of the appendix, left over from our rabbity ancestors who nibbled their way through the herbage
under the feet of the dinosaurs: all the appendix does now is hold out the chance of appendicitis. :(
-
SShot 2022-01-12 at 10.06.47.png
SShot 2022-01-12 at 10.06.47.png (160.2 KiB) Viewed 18229 times
-
Are you going to be the "Miss Evans' of xTalk? 8-)

If so, you'd be doing a lot of people a huge service.
https://richmondmathewson.owlstown.net/
User avatar
OpenXTalkPaul
Posts: 1485
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: ICONS

Post by OpenXTalkPaul »

richmond62 wrote: Wed Jan 12, 2022 8:07 am
The IDE is bloated with a lot of legacy image data, which aren't very optimized for size from what I've seen.
The thing has got bigger and bigger with every version: and because of things we don't use in the IDE, which, presumably, often, get loaded into the memory at startup the whole shebang gets RAM hungrier and slower as time goes on.

The image that comes to my mind is of the appendix, left over from our rabbity ancestors who nibbled their way through the herbage
under the feet of the dinosaurs: all the appendix does now is hold out the chance of appendicitis. :(
-
SShot 2022-01-12 at 10.06.47.png
-
Are you going to be the "Miss Evans' of xTalk? 8-)

If so, you'd be doing a lot of people a huge service.
I think it may be too many messages firing in the single thread that scripts run in that bogs things down in the IDE, which may be why performance sometimes improves when a stack is run in a standalone app. Ram can't be the issue, I've got 40 freakin' GIGS of ram in this laptop!
User avatar
OpenXTalkPaul
Posts: 1485
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: ICONS

Post by OpenXTalkPaul »

So I've been making some progress on the Tools palette vectorization... well sort of, I'm currently replacing, in place, the image text in the tools palette with rasterized versions of the SVG Path Data from an "OXT icon set", in the final Tools version the "classic" controls, paint tools, etc. will be widget based not buttons, same as the "Widget" group.
Progress.png
Progress.png (82.52 KiB) Viewed 18127 times
Progress2.png
Progress2.png (81.27 KiB) Viewed 18127 times

NOTE: This will look slightly different (length-wise) because in these picts I was playing around with the Mac NSView of the stack's window, these are with a Unified Window Headerbar attributes applied, which makes the windows titlebar drop down into the content area of the window, like as an overlay, you can use it to put functional controls next to the window titlebar (without hard coding in a faux titlebar) this has become very common to see in Mac apps these days, which many now have little icon menus there. The only exception is the window's titlebar text area which blocks the underlying area from user clicks, so you're going to want your control's positions linked to the right and/or left side of the window.

I should design a quick logo for "HH", Herman had some screenshot pict in there with those two letters.
User avatar
OpenXTalkPaul
Posts: 1485
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: ICONS

Post by OpenXTalkPaul »

Code: Select all

put ideObjectTypes()

com.livecode.interface.classic.Button
com.livecode.interface.classic.Card
com.livecode.interface.classic.Checkbox
com.livecode.interface.classic.ComboBox
com.livecode.interface.classic.CurveGraphic
com.livecode.interface.classic.DataGrid
com.livecode.interface.classic.DataGridForm
com.livecode.interface.classic.DefaultButton
com.livecode.interface.classic.Field
com.livecode.interface.classic.Group
com.livecode.interface.classic.Image
com.livecode.interface.classic.LabelField
com.livecode.interface.classic.LineGraphic
com.livecode.interface.classic.ListField
com.livecode.interface.classic.LittleArrows
com.livecode.interface.classic.OptionMenu
com.livecode.interface.classic.OvalGraphic
com.livecode.interface.classic.Player
com.livecode.interface.classic.PolygonGraphic
com.livecode.interface.classic.PopupMenu
com.livecode.interface.classic.Progressbar
com.livecode.interface.classic.PulldownMenu
com.livecode.interface.classic.RadioButton
com.livecode.interface.classic.RectangleButton
com.livecode.interface.classic.RectangleGraphic
com.livecode.interface.classic.RegularGraphic
com.livecode.interface.classic.RoundRectGraphic
com.livecode.interface.classic.Scrollbar
com.livecode.interface.classic.Slider
com.livecode.interface.classic.Stack
com.livecode.interface.classic.Substack
com.livecode.interface.classic.TableField
com.livecode.interface.classic.TabPanel
com.livecode.interface.classic.TextArea
com.livecode.interface.classic.widget
com.livecode.interface.Control
com.livecode.interface.MultipleObjects

Second to the last is com.livecode.interface.Control ... I wonder what that's for?
User avatar
richmond62
Posts: 2617
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: ICONS

Post by richmond62 »

I do feel that LC has quite a lot of inbuilt redundancy, so a bit of
pruning may not come amiss.
https://richmondmathewson.owlstown.net/
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests