Discussions related to Visual Prolog
Vidwans
Posts: 2
Joined: 9 Feb 2026 8:34

enabling Mangal font in sciLexer editor control

Post by Vidwans »

I want to develop a word processor for Hindi language in Visual Prolog 9.0. I am trying to use the Editor control that comes with the package. Any idea how to enable Mangal font in the editor form that has sciLexer contol.
Thanks
-Vidwans
User avatar
Thomas Linder Puls
VIP Member
Posts: 1492
Joined: 28 Feb 2000 0:01

Re: enabling Mangal font in sciLexer editor control

Post by Thomas Linder Puls »

Hi, Vidwans.

You will have to call styleSetFont after the control has been created and initialized to override the font that we set by default. One way to do this is to add a show-listener that sets the font:

Code: Select all

constructors     new : (window Parent, string Filename). clauses     new(Parent, Filename) :-         formWindow::new(Parent),         generatedInitialize(),         sciLexerStatusBar_ctl:attach(sciLexer_ctl),         ...         addShowListener({  :- sciLexer_ctl:styleSetFont(0, "Mangal") }).
In plain mode the text is using style 0.
Regards Thomas Linder Puls
PDC
Vidwans
Posts: 2
Joined: 9 Feb 2026 8:34

Re: enabling Mangal font in sciLexer editor control

Post by Vidwans »

Thank you so much. I will try it.
-Vidwans