summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJovansonlee Cesar <ivanceras@gmail.com>2018-07-29 20:21:07 +0800
committerJovansonlee Cesar <ivanceras@gmail.com>2018-07-29 20:21:07 +0800
commit039a92611b8061cc89771fd3e9adb212b4763586 (patch)
tree3a773aa6398e2a6cd2080c3ccecd13c381709510
parent48e7f46732fef1a40138e3d3771d6187065ce529 (diff)
underscore with triangles
-rw-r--r--svgbob/src/focus_char.rs5
-rw-r--r--svgbob/src/properties.rs85
2 files changed, 84 insertions, 6 deletions
diff --git a/svgbob/src/focus_char.rs b/svgbob/src/focus_char.rs
index be43a2a..0fd0435 100644
--- a/svgbob/src/focus_char.rs
+++ b/svgbob/src/focus_char.rs
@@ -260,7 +260,7 @@ impl<'g> FocusChar<'g> {
elm.extend(fragments.clone());
matched = true;
}
- // draw when used as text but intensified
+ // intensified the block
else if self.is_intensified(&block) && !self.used_as_text() {
elm.extend(fragments.clone());
matched = true;
@@ -269,8 +269,7 @@ impl<'g> FocusChar<'g> {
}
}
if !matched && !matched_intended
- && !self.is_blank()
- {
+ && !self.is_blank() {
elm.push(Text(self.text()));
}
} else {
diff --git a/svgbob/src/properties.rs b/svgbob/src/properties.rs
index cd0a08b..ef3daf7 100644
--- a/svgbob/src/properties.rs
+++ b/svgbob/src/properties.rs
@@ -210,6 +210,20 @@ impl Properties for char {
can: IsStrongAll(vec![A, Y]),
},
),
+ // |-
+ ( O,
+ Condition{
+ loc: right(),
+ can: IsStrongAll(vec![K,O])
+ }
+ ),
+ // -|
+ ( K,
+ Condition{
+ loc: left(),
+ can: IsStrongAll(vec![K,O])
+ }
+ ),
],
intended_behavior: vec![
// |
@@ -225,7 +239,9 @@ impl Properties for char {
// |
(vec![A], vec![line(w, m), line(m, a)]),
// |-
- (vec![O], vec![line(o, m)]),
+ (vec![O], vec![line(o, m), line(c,w)]),
+ // -|
+ (vec![K], vec![line(m, k), line(c,w)]),
],
})
}
@@ -266,8 +282,11 @@ impl Properties for char {
else if self.is('_') {
Some(Characteristic {
properties: vec![(U, Strong, vec![line(u, y)]), (Y, Strong, vec![line(u, y)])],
- intensify: vec![],
- intended_behavior: vec![],
+ // override the default behavior
+ intensify: vec![
+ ],
+ intended_behavior: vec![
+ ],
})
}
/////////////////////////////
@@ -297,6 +316,30 @@ impl Properties for char {
can: ConnectTo(C, Strong),
},
),
+ // /-
+ (
+ O,
+ Condition{
+ loc: right(),
+ can: IsStrongAll(vec![K, O]),
+ },
+ ),
+ // -/
+ (
+ K,
+ Condition{
+ loc: left(),
+ can: IsStrongAll(vec![K, O]),
+ },
+ ),
+ // /_
+ (
+ Y,
+ Condition{
+ loc: right(),
+ can: IsStrongAll(vec![U,Y])
+ }
+ ),
],
intended_behavior: vec![
// |
@@ -305,6 +348,12 @@ impl Properties for char {
// /
// |
(vec![W], vec![line(m, w), line(m, e)]),
+ // /-
+ (vec![O], vec![line(o, m), line(u, e)]),
+ // -/
+ (vec![K], vec![line(k, m), line(u, e)]),
+ // /_
+ (vec![Y], vec![line(u, y), line(u, e)]),
],
})
}
@@ -335,6 +384,30 @@ impl Properties for char {
can: ConnectTo(W, Strong),
},
),
+ // -\
+ (
+ K,
+ Condition {
+ loc: left(),
+ can: IsStrongAll(vec![K,O])
+ }
+ ),
+ // \-
+ (
+ O,
+ Condition{
+ loc: right(),
+ can: IsStrongAll(vec![K,O])
+ }
+ ),
+ // _\
+ (
+ U,
+ Condition{
+ loc: left(),
+ can: IsStrongAll(vec![U,Y])
+ }
+ ),
],
intended_behavior: vec![
// \
@@ -343,6 +416,12 @@ impl Properties for char {
// |
// \
(vec![C], vec![line(y, m), line(m, c)]),
+ // -\
+ (vec![K], vec![line(a, y), line(k, m)]),
+ // \-
+ (vec![O], vec![line(a, y), line(m, o)]),
+ // _\
+ (vec![U], vec![line(u, y), line(a, y)]),
],
})
}