Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
clean-and-itasks
clean-ide
Commits
7c89244a
Commit
7c89244a
authored
Feb 21, 2003
by
Diederik van Arkel
Browse files
consolidate fixed font handling
parent
20f15543
Changes
2
Hide whitespace changes
Inline
Side-by-side
Util/ioutil.dcl
View file @
7c89244a
...
...
@@ -28,3 +28,5 @@ getPenAttributeColour :: ![.PenAttribute] -> Colour;
getPenAttributeBack
::
![.
PenAttribute
]
->
Colour
;
seqmap
::
(.
a
->
.(.
b
->
.
b
))
![.
a
]
!.
b
->
.
b
;
notEmpty
s
:==
not
(
isEmpty
s
)
lisFixedWidth
::
!.
FontName
!*
Picture
->
(!
Bool
,!*
Picture
)
lfilter
::
![.
Bool
]
![.
a
]
->
[.
a
]
Util/ioutil.icl
View file @
7c89244a
...
...
@@ -147,3 +147,19 @@ seqmap f [h:t] e
notEmpty
s
:==
not
(
isEmpty
s
)
//--
lisFixedWidth
::
!.
FontName
!*
Picture
->
(!
Bool
,!*
Picture
)
lisFixedWidth
fontname
env
#
((
ok
,
font
),
env
)
=
openFont
{
fName
=
fontname
,
fSize
=
12
,
fStyles
=[]}
env
|
not
ok
=
(
ok
,
env
)
// # (wide, env) = getFontCharWidth font 'M' env
// (narrow, env) = getFontCharWidth font 'i' env
#
([
wide
,
narrow
:_],
env
)
=
getFontCharWidths
font
[
'M
'
,
'
i'
]
env
=
(
wide
==
narrow
,
env
)
lfilter
::
![.
Bool
]
![.
a
]
->
[.
a
]
lfilter
[
True
:
r
]
[
a
:
x
]
=
[
a
:
lfilter
r
x
]
lfilter
[_:
r
]
[_:
x
]
=
lfilter
r
x
lfilter
_
_
=
[]
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment