Re: Default font swipl-win.exe

Jan Wielemaker <[email protected]>
Newsgroups gmane.comp.ai.prolog.swi
Message-ID <[email protected]>
On 01/03/2014 10:55 AM, Marco Verpelli wrote:
> It would be nice to add a command to change the current font from a
> prolog program. I know that is possible with XPCE but the "simple"
> Windows console is all what I need (for now!)

You can change the font through the UI.  If that is not enough, feel
free to send a patch.  The current set of predicates for the console
is described in http://swi-prolog.org/pldoc/man?section=plwin

I consider the old Windows swipl-win.exe a dead end, although the time
line to replace it is not fixed.

	Cheers --- Jan

>
> Marco
>
> In data 03 gennaio 2014 alle ore 10:40:13, Jan Wielemaker
> <[email protected]> ha scritto:
>
>> On 01/02/2014 07:55 PM, Marco Verpelli wrote:
>>> Use the source! I forgot this advice.
>>
>> Yes.  Only, there are two swipl-win[.exe] at the moment: the old
>> one written by me for Windows and the new one written by Carlo
>> using Qt.  The old one is still the one on Windows.  The new one is
>> currently only the default for MacOS.  The source of the old one is
>> in
>>
>> src/win32/console/console.c.  There we read the default as:
>>
>> b->hfont = GetStockObject(ANSI_FIXED_FONT);
>>
>> If not default, the properties are read from the registry and a
>> font is created using CreateFontIndirect().
>>
>> Possibly the default is not a great idea for Unicode fonts.  If
>> anyone knows a better way, please send a patch.
>>
>> Cheers --- Jan
>>
>>>
>>> Marco
>>>
>>> In data 02 gennaio 2014 alle ore 19:24:14, Carlo Capelli
>>> <[email protected]> ha scritto:
>>>
>>>>
>>>>
>>>>
>>>> 2014/1/2 Marco Verpelli <[email protected]>
>>>>> Hi,
>>>>>
>>>>> can you tell me what is the default font for swipl-win.exe?
>>>>
>>>>
>>>> in Preferences.cpp there is the initialization line
>>>>
>>>> console_font = value("console_font", QFont("courier",
>>>> 12)).value<QFont>();
>>>>
>>>> If I open the Settings\Font... dialog in Ubuntu, I can select
>>>> the matching entry: Courier 10 Pitch
>>>>
>>>> HTH Carlo
>>>>
>>>>> Trying to display unicode characters I have changed the font
>>>>> and now I am unable to reset to default.
>>>>>
>>>>> TY
>>>>>
>>>>> Marco _______________________________________________
>>>>> SWI-Prolog mailing list [email protected]
>>>>> https://lists.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog
>>>
>>>>>
-------------- next part --------------
>>> HTML attachment scrubbed and removed
>>> _______________________________________________ SWI-Prolog
>>> mailing list [email protected]
>>> https://lists.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.