Page 1 of 1

Full justification code?

Posted: Tue Feb 13, 2024 1:44 pm
by Joubarbe
Does anyone have a full justify function for mono fonts? I'm sure that must exist somewhere :)

Re: Full justification code?

Posted: Thu Feb 15, 2024 7:42 am
by firace
Joubarbe wrote: Tue Feb 13, 2024 1:44 pm Does anyone have a full justify function for mono fonts? I'm sure that must exist somewhere :)
For the EditorGadget?
And do you need cross platform?

Re: Full justification code?

Posted: Mon Feb 19, 2024 3:58 am
by Joubarbe
General purpose. It would be for my own gadget, so nothing to do with the native ones. There are some codes out there for other languages, including Python and Java, but I failed at porting them :?

Re: Full justification code?

Posted: Mon Feb 19, 2024 6:41 pm
by #NULL
I did something like general text justification (with any font) in sgx. IIRC you it could justify text by expanding the spaces between the words or even between the characters (not sure what the latter was exactly).
Use 'Find in files' with sgx.pbi to find all places, mostly sgx_drawTextLF() (needs one other function and an enumeration)
examples for how it looks are in sgxDoc/04sgxText.pb

But maybe you are looking for something more specific where words/characters stay within the monospace 'matrix' and don't get shifted pixelwise? I don't have anything for that right now.

Re: Full justification code?

Posted: Wed Feb 21, 2024 11:22 am
by Joubarbe
Ok thanks for the help #NULL.