Commit graph

1995 commits

Author SHA1 Message Date
OneRain2333
9302a14e02 fix typo 2023-01-24 16:24:32 +08:00
OneRain2333
e588b86c04 add borderOffset variable 2023-01-24 16:24:32 +08:00
OneRain2333
e858d355a3 update test using go 1.18 2023-01-24 16:24:32 +08:00
OneRain2333
9a1fed3077 update d2svg.go 2023-01-24 16:24:26 +08:00
OneRain2333
735add1b32 update tests 2023-01-24 16:21:39 +08:00
OneRain2333
9a070a52f9 Add double bordered rect, oval, square 2023-01-24 16:21:25 +08:00
OneRain2333
344718dad3 Remove double circle shape 2023-01-24 16:21:25 +08:00
OneRain2333
9575c768dc Make to be a style attribute and remove shape 2023-01-24 16:21:25 +08:00
OneRain2333
c75e540840 update renderDoubleOval function 2023-01-24 16:21:25 +08:00
OneRain2333
0692237cbe Add test case for double circle 2023-01-24 16:21:25 +08:00
OneRain2333
d91ace98ec Fix ascii diagram and remove unused code 2023-01-24 16:21:25 +08:00
OneRain2333
a64d87eb61 Implement the sketch of double circle 2023-01-24 16:21:25 +08:00
OneRain2333
8bb86250fb Add double circle shape 2023-01-24 16:21:25 +08:00
Anmol Sethi
5abde05b86
Merge pull request #595 from avelino/avelino/issue-594
docker: add ca-certificates package
2023-01-24 00:12:03 -08:00
Kevin David
bd7e18395e
d2renderers: d2fonts: add bold + italic styles for Source Code Pro
👋 I've been playing around with changing the entire font of a diagram to something fixed-width, starting by hand-editing `main.go`

I noticed that if I switched over the family to Source Code Pro, d2 crashed with the following stack:

```
[23:38:30] info: compiling GetUniqueColumnName-fix.d2...
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x1c4 pc=0x16b562c]

goroutine 43 [running]:
github.com/golang/freetype/truetype.(*Font).Bounds(0xc000669670?, 0x0?)
        /Users/kevin/dev/go/pkg/mod/github.com/golang/freetype@v0.0.0-20170609003504-e2365dfdc4a0/truetype/truetype.go:378 +0xc
github.com/golang/freetype/truetype.NewFace(0x0, 0xc0003276c0)
        /Users/kevin/dev/go/pkg/mod/github.com/golang/freetype@v0.0.0-20170609003504-e2365dfdc4a0/truetype/face.go:199 +0x325
oss.terrastruct.com/d2/lib/textmeasure.(*Ruler).addFontSize(0xc00037c000, {{0x1bb9a34, 0xd}, {0x1b82732, 0x4}, 0x1f})
        /Users/kevin/dev/d2/lib/textmeasure/textmeasure.go:141 +0x112
oss.terrastruct.com/d2/lib/textmeasure.(*Ruler).MeasurePrecise(0xc00037c000, {{0x1bb9a34, 0xd}, {0x1b82732, 0x4}, 0x1f}, {0xc000582100, 0x1f})
        /Users/kevin/dev/d2/lib/textmeasure/textmeasure.go:157 +0xde
oss.terrastruct.com/d2/lib/textmeasure.(*Ruler).Measure(...)
        /Users/kevin/dev/d2/lib/textmeasure/textmeasure.go:151
oss.terrastruct.com/d2/d2graph.GetTextDimensions({0x0, 0x0, 0xc000657860?}, 0xc00037c000, 0xc000620280, 0xc000092020)
```

Which I tracked down to these missing styles, which appear to matter even if they aren't used.

I acquired the `ttf` files from https://fonts.google.com/specimen/Source+Code+Pro

I created the encoded fonts on my Mac with:
```
base64 -i SourceCodePro-Italic.ttf -o ../encoded/SourceCodePro-Italic.txt
```

Hopefully this is correct! Open to all feedback, especially since I think this is the first change I've ever made to a go program :)

Signed-off-by: Kevin David <kevin-david@github.com>
2023-01-23 00:35:19 -05:00
Apostolis A
4aee9da433
Update ci/e2ereport.sh
Co-authored-by: Anmol Sethi <hi@nhooyr.io>
2023-01-23 03:12:26 +02:00
OneRain2333
c19d90eb20 Use constant to define offset of double-bordered shape 2023-01-22 18:21:30 +08:00
OneRain2333
be73f4b2b2 fix typo 2023-01-22 17:53:10 +08:00
OneRain2333
0ad266f1c8 add borderOffset variable 2023-01-22 16:50:14 +08:00
Apostolis Anastasiou
ec9617eafe
Add redirection of output to /dev/null for xdg-open
Signed-off-by: Apostolis Anastasiou <apostolis.anastasiou.alpha@gmail.com>
2023-01-21 19:02:55 +02:00
Alexander Wang
13d202b84b
Merge pull request #697 from terrastruct/v0.1.6
v0.1.6
2023-01-19 21:42:46 -08:00
Alexander Wang
688f156b8e
v0.1.6 2023-01-19 21:38:15 -08:00
Alexander Wang
e7596bedae
Merge pull request #695 from alixander/prep-changelog
prep 0.1.6 changelog
2023-01-19 21:19:12 -08:00
Alexander Wang
c8ce9f6d14
move gif 2023-01-19 21:15:10 -08:00
Alexander Wang
6e540cf42b
typo 2023-01-19 21:01:28 -08:00
Alexander Wang
0b389635fd
prep changelog 2023-01-19 20:56:57 -08:00
Apostolis A
3cc8ab1cb8
Update ci/e2ereport.sh
Co-authored-by: Anmol Sethi <hi@nhooyr.io>
2023-01-20 04:29:47 +02:00
Alexander Wang
7458967728
Merge pull request #694 from alixander/span-bug
sequence_diagram: fix self-span messages
2023-01-19 18:16:38 -08:00
Alexander Wang
f595aafcc4
fix self-span in sequence diagrams 2023-01-19 18:09:32 -08:00
Alexander Wang
a1bebb8b23
Merge pull request #634 from Paracelsus-Rose/master
d2renderer: #579 Circle Arrowhead
2023-01-19 17:56:36 -08:00
Paracelsus-Rose
182e3b0254
submodule 2023-01-19 20:50:27 -05:00
Paracelsus-Rose
538b75b5d1
Removed Duplicate 2023-01-19 20:43:10 -05:00
Apostolis Anastasiou
de5c00ac23
Add test to see if command exists with POSIX 'command' 2023-01-20 03:09:16 +02:00
Alexander Wang
c3085126e4
Merge pull request #688 from alixander/border-radius
support border-radius
2023-01-19 15:39:20 -08:00
Alexander Wang
de1eed2072
test 2023-01-19 15:34:54 -08:00
Alexander Wang
d4c4bc0c08
changelog 2023-01-19 15:29:44 -08:00
Alexander Wang
e2ee813f37
support border-radius
Co-authored-by: Apostolis Anastasiou <anastasiou@inaccess.com>
2023-01-19 15:28:00 -08:00
Alexander Wang
69823d1a34
Merge pull request #687 from alixander/near-panic
fix panic when solo near keyword
2023-01-19 15:18:16 -08:00
Alexander Wang
d6a50b11c8
changelog 2023-01-19 15:14:06 -08:00
Alexander Wang
098fc96bd9
edge case 2023-01-19 15:13:18 -08:00
Alexander Wang
568742e50a
test 2023-01-19 15:04:41 -08:00
Alexander Wang
320d631113
fix constant-near panic 2023-01-19 15:03:52 -08:00
Alexander Wang
5a727071ea
Merge pull request #685 from alixander/multiple-bounding
fix bounding box for multiple
2023-01-19 13:01:19 -08:00
Alexander Wang
b41d8cdbc7
tests 2023-01-19 12:44:53 -08:00
Alexander Wang
ab94925fc7
changelog 2023-01-19 12:40:23 -08:00
Alexander Wang
2966d393ae
fix bounding box for multiple 2023-01-19 12:39:12 -08:00
Alexander Wang
e5b0a025a5
Merge pull request #684 from alixander/3d-bounding-2
fix 3d bounding
2023-01-19 12:35:07 -08:00
Alexander Wang
476e443c6d
changelog 2023-01-19 12:30:08 -08:00
Alexander Wang
d76169e855
Merge branch 'master' into 3d-bounding-2 2023-01-19 12:29:15 -08:00
Alexander Wang
caa23a7699
ok 2023-01-19 12:28:10 -08:00