Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export doesn't consider font family #2892

Closed
alebx opened this issue Oct 4, 2022 · 3 comments
Closed

Export doesn't consider font family #2892

alebx opened this issue Oct 4, 2022 · 3 comments

Comments

@alebx
Copy link

alebx commented Oct 4, 2022

Description

If a specific font family is set, the font family isn't applied in the export.

Steps to check or reproduce

  1. set a font family for .bb svg
  2. export the chart

https://zfbya9.stackblitz.io

@netil
Copy link
Member

netil commented Oct 5, 2022

Hi @alebx, thanks for the report. I'll dig into.

@netil
Copy link
Member

netil commented Oct 7, 2022

To reflect custom style font need to make font's data embeddable.
The current conversion pipeline goes generating a svg node embedding all the styles used from the page.
And then from the generated svg + styles trees, use canvas' API to generate image.

Unfortunately, to generate image from svg node, svg should contain all the styles needed. So the web font too.

There're two possible approaches:

The best for user, obviously will be the second one. But the implementing it will take time.
I'll be considering to enhance this for the next release.

netil added a commit to netil/billboard.js that referenced this issue Oct 17, 2022
Enhance to preserve outlint applied font-family on export.

Ref naver#2892
netil added a commit to netil/billboard.js that referenced this issue Oct 18, 2022
Enhance to preserve outlint applied font-family on export.

Ref naver#2892
netil added a commit to netil/billboard.js that referenced this issue Oct 18, 2022
Enhance to preserve outlink applied font-family on export.

Ref naver#2892
@netil netil closed this as completed in 5d1944e Oct 18, 2022
@alebx
Copy link
Author

alebx commented Oct 18, 2022

@netil Thanks for the quick fix!

netil added a commit that referenced this issue Oct 21, 2022
Enhance to preserve outlink applied font-family on export.

Close #2892
netil added a commit that referenced this issue Oct 26, 2022
Enhance to preserve outlink applied font-family on export.

Close #2892
netil added a commit that referenced this issue Oct 28, 2022
Enhance to preserve outlink applied font-family on export.

Close #2892
github-actions bot pushed a commit that referenced this issue Dec 7, 2022
# [3.7.0-next.1](3.6.3...3.7.0-next.1) (2022-12-07)

### Bug Fixes

* **axis:** Fix axis label overlap when has no data ([643357b](643357b)), closes [#2974](#2974)
* **axis:** fix axis.y/y2.tick.format context error ([54ee419](54ee419)), closes [#2976](#2976)
* **domain:** Fix wrong domain range setting ([b55b153](b55b153)), closes [#2962](#2962)
* **options:** Fix data.regions path rendering for category axis ([249d0ac](249d0ac)), closes [#2950](#2950)
* **types:** Add missing param definition for gauge.label.format ([d663532](d663532)), closes [#2946](#2946)
* **types:** Fix to referenced but missing d3 types ([0b57454](0b57454)), closes [#2954](#2954) [#2961](#2961)
* **types:** Support dual module type.d in TS >= 4.7 ([143e491](143e491)), closes [#2952](#2952) [#2953](#2953)

### Features

* **api:** Enhance .export() to preserve fontStyle ([0809ae7](0809ae7)), closes [#2892](#2892)
* **arc:** Intent to ship arc.cornerRadius ([e8320cf](e8320cf)), closes [#2936](#2936)
* **module:** Support dual CJS/ESM package ([437c007](437c007)), closes [#2202](#2202)
* **plugin:** Intent to ship TableView plugin ([215b611](215b611)), closes [#1873](#1873)
* **tooltip:** Enhance passing ratio value for stacked area/bar ([9e7ff01](9e7ff01)), closes [#2921](#2921)
github-actions bot pushed a commit that referenced this issue Jan 11, 2023
# [3.7.0](3.6.3...3.7.0) (2023-01-11)

### Bug Fixes

* **axis:** Fix axis label overlap when has no data ([643357b](643357b)), closes [#2974](#2974)
* **axis:** fix axis.y/y2.tick.format context error ([54ee419](54ee419)), closes [#2976](#2976)
* **domain:** Fix wrong domain range setting ([b55b153](b55b153)), closes [#2962](#2962)
* **options:** Fix data.regions path rendering for category axis ([249d0ac](249d0ac)), closes [#2950](#2950)
* **plugin:** Fix stanford scale to accept 0 as min value ([02c4270](02c4270)), closes [#2999](#2999)
* **selection:** Fix selection w/point.focus.only=true & selection.multiple=false ([af93a8a](af93a8a)), closes [#2928](#2928) [#3013](#3013)
* **types:** Add missing param definition for gauge.label.format ([d663532](d663532)), closes [#2946](#2946)
* **types:** Fix to referenced but missing d3 types ([0b57454](0b57454)), closes [#2954](#2954) [#2961](#2961)
* **types:** Support dual module type.d in TS >= 4.7 ([143e491](143e491)), closes [#2952](#2952) [#2953](#2953)

### Features

* **api:** Enhance .export() to preserve fontStyle ([0809ae7](0809ae7)), closes [#2892](#2892)
* **arc:** Intent to ship arc.cornerRadius ([e8320cf](e8320cf)), closes [#2936](#2936)
* **tooltip:** Enhance passing ratio value for stacked area/bar ([9e7ff01](9e7ff01)), closes [#2921](#2921)
* **treemap:** Intent to ship treemap type ([9809ef1](9809ef1)), closes [#123](#123) [#3002](#3002) [#3004](#3004) [#3006](#3006) [#3007](#3007) [#3008](#3008)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants