-
Notifications
You must be signed in to change notification settings - Fork 1
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
Text style support #22
Comments
My current implementation work https://github.com/sfeir-open-source/xlayers/tree/text-styling. |
I noticed that the "text" class of demo files have different width and color from JSON and from what SketchApp show, after re-editing it everything have real value. |
Can you elaborate on that more in details ? |
Well, well, that's unfortunate. Maybe a bug in SketchApp? Can we prevent this on our side? |
In fact, this seems difficult to prevent even if we create an exception on the "text" class in the style parser that will break correct files (I still didn't find how they handle the color/width correction). |
Fair enough. We should probably organize the demo files by SketchApp version. This would help us quickly identify corrupted versions. Do you still have the different SketchApp versions on your machine? |
I have all SketchApp version from 46 to 52. |
* refactor: remove old text class fix * feat: text color parsing (sfeir-open-source#22) * refactor: typed style parser methods * chore: comment text parsers * test: add test for text style parser
* refactor: remove old text class fix * feat: text color parsing (sfeir-open-source#22) * refactor: typed style parser methods * chore: comment text parsers * test: add test for text style parser closes (sfeir-open-source#22)
* chore: getting master and develop in an even state (#76) * chore: merge develop (#9) * chore: show build number in the editor UI * docs: add more badges * docs: update badges * docs: update readme * chore: use perl to tag a new build * chore: updat version pattern * chore: merge develop (#16) * docs: update twitter link * fix: auto select the layout toggle button when selecting a layer (#15) * chore: merge develop (#17) * docs: update twitter link * fix: auto select the layout toggle button when selecting a layer (#15) * docs: update contributions part * docs: add CONTRIBUTING guide * chore: merge develop (#20) * docs: update twitter link * fix: auto select the layout toggle button when selecting a layer (#15) * docs: update contributions part * docs: add CONTRIBUTING guide * fix: issue #14 * chore: merge develop (#36) * docs: add CODING_STANDARDS.md * docs: update CODING_STANDARDS.md * fix(docs): change base branch name from master to develop (#33) * fix(editor): change zoom origin to center (#32) * fix(home): change logo image and animation (#31) * feat(packaging): add basic PWA support (#30) * docs: add "is it maintained" badge (#1) (#34) * chore: merge develop (#52) * chore: add cloud build config * chore: make all tests pass * chore: use test:ci instead of test on a CI env * chore: update cloudbuild config * chore: use ngcontainer:0.5.0 * chore: add puppeteer * chore: update docker config * chore: set CHROME_BIN to puppeteer * chore: switch to gcr.io/cloud-builders/npm * chore: update COPY command * chore: use angular/ngcontainer for testing * chore: adding custom ngcontainer build * chore: get built source from GCB * chore: improved cloudbuild.yaml * chore: update angular/ngcontainer image * chore(deploy): use $SHORT_SHA if present * chore: update nginx config * chore: use nginx:latest * chore: disable k8s deployment (temporary) * build(Dockerfile): copy the xlayers artifacts from ./dist/html * build: rename script to stamp-deploy.sh * build(k8s): use a YAML template for k8s * chore: stashing current YAML config * build(cloudbuilder): add a custom kubectl cloud builder * build: change stamp version pattern * docs: add opencollective badge * docc: update sponsors section * chore: use angular/ngcontainer for testing * chore: adding custom ngcontainer build * chore: get built source from GCB * chore: update angular/ngcontainer image * chore(deploy): use $SHORT_SHA if present * chore: use nginx:latest * feat: select for demo Sketch files now with a select you can choose from different demo Sketch files * fix: remove invalid demo file from list * fix: css layout * chore(core): switch to angular master versions (#48) * refactor: update deps to angular#master * refactor: update links to the github repo * chore: use different environment when loading demo files * fix: the mat-drawer top edge was hidden behind the header * fix: add a min-width of 1000px to the editor layout * build: change stamp version pattern * chore: add missing speed-measure-webpack-plugin * build: rename the build stamp file * refactor: exit script if env vars are undefined * build: copy the dist artifact from ./dist/html * build: use *.angular.run as a preview domaine * build: update all build steps * chore: add a test script to trigger Cloud Builds from the local machine * chore: store the artifact inside dist/html * chore: fix stamping script * refactor: centralize css (#79) * refactor: centralize css (#33) * fix: sketch text rect width + 1 exception * fix: unit tests (#78) * chore: fixing failing unit tests (wip) * fix: remove isPreview useless field * fix: random int/float * fix: fix canvas test * test: remove non deterministic mock * refactor: implement style parser test behavior * test: bplist parser test * refactor: group style parser unit test into sub-describes * test: check spy return on bplist parser 64 content * test: add more test to file dropzone * refactor: remove generated mock from sketch layer test * refactor: remove sketch page mock * refactor: remove dynamic mock from sketch service test * fix: mouse event compatibility (#75) * build: upgrade to angular 7.1.0 (#80) * build: upgrade to angular 7.1.0 * fix: ignore no-output-rename lint rule * fix: use current domain as an origin to load demo files (#81) * docs: update the wording to include vue and react * chore: add multiple version of demo files (#84) * feat: add new UI for demo file selection (#85) * feat: improve text styling support (#83) * refactor: remove old text class fix * feat: text color parsing (sfeir-open-source#22) * refactor: typed style parser methods * chore: comment text parsers * test: add test for text style parser closes (sfeir-open-source#22) * feat: improve the setting sidebar IU (#87) * fix: remove unused property
At the moment all text present in the project is using a default black colour and default Robot font family.
The solution i found is simply add a text style parsing implementation in the SketchStyleParserSerivce.
The text was updated successfully, but these errors were encountered: