Comments (11)
Also I would like to confirm an unexpected behavior
...
It would help me organzing stuff if this is opened in a different issue. That said, this is "expected", although not well documented: https://doc.speedata.de/publisher/en/basics/fileorganization/#ch-fileorganization
dupicate entries should give a better warning.
from publisher.
A workaround (until I provide a fix) is to say html="off"
with Paragraph:
<Paragraph html="off">
from publisher.
This should be fixed in version 4.15.20 (now online). Thank you very much for your bug report and your patience!
from publisher.
Thank you very much!
For me: here is a layout that crashes
<Layout xmlns="urn:speedata.de:2009/publisher/en"
xmlns:sd="urn:speedata:2009/publisher/functions/en">
<Record element="data">
<PlaceObject>
<Textblock>
<Paragraph>
<Value>​ text</Value>
</Paragraph>
</Textblock>
</PlaceObject>
</Record>
</Layout>
(4.15.19, sp --dummy)
from publisher.
@LdBeth I am not sure that I am able to fix the error without more help from you.
- do you use harfbuzz mode when loading the fonts (a global switch in the configuration file or
mode="harfbuzz"
with<LoadFont...>
? - could you provide a small layout file that shows the problem?
I have a fix for a problem I have constructed above, but I am not sure (different error message) that this will also fix your error.
from publisher.
do you use harfbuzz mode when loading the fonts (a global switch in the configuration file or mode="harfbuzz" with <LoadFont...>?
No, it is a different issue from the problem here but It seems harfbuzz mode cannot be use together with font fallback. While in the layout file I used when I discover this issue I relied on font fallback to handle English text mixed with Japanese.
<LoadFontfile name="Sans" filename="IBMPlexSerif-Regular.ttf">
<Fallback filename="KleeOne-Regular.ttf" />
</LoadFontfile>
Actually, the problem cannot be reproduced with harfbuzz mode on.
<Layout
xmlns="urn:speedata.de:2009/publisher/en"
xmlns:db='http://docbook.org/ns/docbook'
xmlns:sd="urn:speedata:2009/publisher/functions/en">
<Options mainlanguage="en"/>
<LoadFontfile name="Sans" filename="KleeOne-Regular.ttf"/> <!-- with mode="harfbuzz" the crash won't happen -->
<DefineFontfamily name="sans" fontsize="9" leading="11">
<Regular fontface="Sans"/>
</DefineFontfamily>
<Hyphenation>Gun-dam</Hyphenation>
<Hyphenation>as–sas–sin</Hyphenation>
<DefineTextformat name="title" break-below="no"
alignment="leftaligned"/>
<DefineTextformat name="yr" break-below="no"
alignment="rightaligned"/>
<DefineTextformat name="desc" alignment="leftaligned"
indentation="0.2cm"/>
<Pagetype name="page" test="true()">
<Margin left="1cm" right="1cm" top="1cm" bottom="1cm"/>
<AtPageCreation>
<PlaceObject column="1" row="1">
<Textblock><Copy-of select="$header"/></Textblock>
</PlaceObject>
<PlaceObject column="10" row="1">
<Textblock>
<Paragraph>
<Value>Page: </Value>
<Value select="sd:current-page()"/>
</Paragraph>
</Textblock>
</PlaceObject>
</AtPageCreation>
<PositioningArea name="text">
<PositioningFrame
width="9"
height="{(sd:number-of-rows() div 2) - 2}"
row="2"
column="1"/>
<PositioningFrame
width="9"
height="{(sd:number-of-rows() div 2) - 2}"
row="2"
column="11"/>
<PositioningFrame
width="9"
height="{(sd:number-of-rows() div 2) - 1}"
row="{(sd:number-of-rows() div 2) + 2}"
column="1"/>
<PositioningFrame
width="9"
height="{(sd:number-of-rows() div 2) - 1}"
row="{(sd:number-of-rows() div 2) + 1}"
column="11"/>
</PositioningArea>
</Pagetype>
<Record element="document">
<SetVariable variable="header">
<Paragraph><Value select="header"/></Paragraph>
</SetVariable>
<ProcessNode select="*"/>
</Record>
<Record element="entry">
<Output area="text">
<Text>
<Paragraph language="--"
fontfamily="sans"
textformat="title"><Value select="title"/></Paragraph>
<Paragraph textformat="yr"><Value>(</Value>
<Value select="year"/><Value>)</Value></Paragraph>
</Text>
</Output>
</Record>
</Layout>
and
data.xml
<document>
<entry>
<title>Chainsaw​ Man</title>
<year>2022</year>
</entry>
</document>
Also the font file seems unrelated to the problem so you can replace them with the files available on your system.
from publisher.
Thank you very much!
For me: here is a layout that crashes
<Layout xmlns="urn:speedata.de:2009/publisher/en" xmlns:sd="urn:speedata:2009/publisher/functions/en"> <Record element="data"> <PlaceObject> <Textblock> <Paragraph> <Value>​ text</Value> </Paragraph> </Textblock> </PlaceObject> </Record> </Layout>
(4.15.19, sp --dummy)
I cannot reproduce the program crash with this example on 4.15.19, however I found the issue to be using sp --dummy
and following layout file, the program exits without indication of error, but the output pdf only contains the "text" after ZWSP, the "my a" before are missing.
<Layout xmlns="urn:speedata.de:2009/publisher/en"
xmlns:sd="urn:speedata:2009/publisher/functions/en">
<Options mainlanguage="en"/>
<Record element="data">
<PlaceObject>
<Textblock>
<Paragraph>
<Value>my a​text</Value>
</Paragraph>
</Textblock>
</PlaceObject>
</Record>
</Layout>
from publisher.
Also I would like to confirm an unexpected behavior, when the file directory is like
layout.xml
data.xml
foo/data.xml
The file foo/data.xml
is loaded instead of data.xml
. Which I believe is an edge case not handled in the code.
from publisher.
do you use harfbuzz mode when loading the fonts (a global switch in the configuration file or mode="harfbuzz" with <LoadFont...>?
No, it is a different issue from the problem here but It seems harfbuzz mode cannot be use together with font fallback.
... thank you very much, I can reproduce the problem and I will provide a fix.
from publisher.
Minimal layout:
<Layout
xmlns="urn:speedata.de:2009/publisher/en"
xmlns:sd="urn:speedata:2009/publisher/functions/en">
<Record element="data">
<PlaceObject>
<Textblock>
<Paragraph>
<Value select="title" />
</Paragraph>
</Textblock>
</PlaceObject>
</Record>
</Layout>
data:
<data>
<title>a​ b</title>
</data>
from publisher.
Yes, I can confirm the minimal layout reproduces the same problem I have.
from publisher.
Related Issues (20)
- xi:include warning (VSCode) HOT 21
- Git repository missing tags for releases HOT 6
- No install target and build assumes isolated directory structure HOT 5
- Update documentation
- Rename backgroundcolor to background-color on Box, Circle, Column, Frame, PlaceObject, Td and Tr
- lxpath attribute and br
- Version 4.17.0 + fail HOT 22
- 4.17.7 (Debian) Xinclude not imported HOT 6
- `_lastpage` showing as 1 in latest stable HOT 2
- Remove all RLE, LRE, RLO, LRO, PDF, and BN characters from visible output
- mode=harfbuzz rendering fails
- Issues compiling 4.17.16 on FreeBSD 14: `fatal error: 'lauxlib.h' file not found` HOT 11
- Render grid in Groups for tracing
- Windows libsplib broken HOT 11
- segfault with zws
- While and lxpath
- Add test cases for (new) xpath set variable
- Column without width and table rule color
- `<PDFOptions creator="">` and `--suppressinfo` HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from publisher.