I want to prevent design collapse by font in Collabora

In our usage, we still can’t avoid using MS Office yet. Our problem is design collapse such as table due to font difference.
When editing with Collabora, it is good to have a setting that forcibly maintains the original font information without saving font information. *Various sizes are not changed according to such font relation.

As a quick way to do that, I think that installing fonts used by Collabora on all local PCs. But there are also difficult situations.

Are there any good ideas?

As a quick way to do that, I think that installing fonts used by Collabora on all local PCs. But there are also difficult situations.

It is the other way around. Collabora Online does not use fonts from local PC. All fonts that you need for your documents have to be installed on the Collabora Online server.

When you install loolwsd package, the post-install script will look for additional fonts on your
system, and install them for Collabora Online (in the systemplate). If you install fonts to your system
after installing loolwsd, you need to update the systemplate manually.

su lool --shell=/bin/sh -c "loolwsd-systemplate-setup /opt/lool/systemplate /opt/collaboraoffice5.3 >/dev/null 2>&1"
1 Like

In other words, there is a need to build LibreOffice online or Collabora Office.
We have almost browsing. Sometimes I want to edit the target file. Now we need to be nervous and open the file. I want to prevent design collapse by erroneous operation at the time of viewing.

You don’t have to build LibreOffice online or Collabora Office. You can build a new docker image based on collabora/code for example, and add the required font packages.

1 Like

Thank you. I could have hope.
Could you teach me concrete way to add fonts?

I am using collabora online by package not docker.
I uploaded new fonts to the /opt/collaboraoffice5.3/share/fonts/truetype folder

I then updated the sys template by abobe command and restarted the service.

After that It did not work at all anymore. Also removing the fonts and restarting again did not make a difference.

In the log it shows: FATAL: Failed to fork child processes.
If i check: /opt/lool/child-roots there is a child-root created every new restart of loolwsd.

I don’t know if all of this is related. But it started after trying to add fonts.

Please read how to build Docker images (docker build). The Dockerfile you need will be something like this:

FROM collabora/code
RUN apt update
RUN apt install <write here the font package names in Ubuntu 16.04 that you need>
# and/or
COPY <font-files> /usr/share/fonts/truetype
RUN su lool --shell=/bin/sh -c "loolwsd-systemplate-setup /opt/lool/systemplate /opt/libreoffice >/dev/null 2>&1"
CMD bash start-libreoffice.sh

I did not try this, so please don’t follow it blindly, and read the Docker manual.

1 Like

I needed to reinstall loolwsd to get it back on track.
I thought I maybe did some wrong by running that command so I did it without that command
Copied the calibriX.ttf files from my win machine to the /opt/collaboraoffice5.3/share/fonts/truetype folder and restarted the loolwsd.service (not the systemplate update command this time)

No such luck. Removing the calibriX.ttf files and restarting did not make loolwsd to run either…

I had to reinstall loolwsd again to get it back to a working state.

I see the calibri.ttf files are huge compared to the other .ttf files <edit: no some Noto fonts are even bigger />… is there some restriction or limit? <edit: can it be licenses on fonts? /> Still then why would adding them to the folder make loolwsd to crash completely and permanently?

I am stopped at “–shell=/bin/sh”. I think this is “dash” in ubuntu.
I’m CentOS7.3, but I can’t install dash. Is there a way to avoid it?

The font group I added is recognized by the server. I think it is a goal if I can run a line of problems. I want to think so…

I did find a solution to this. For a collabora install without docker, but as it is installing the fonts on the server itself, may be working as well for a docker instance.

RUN su lool --shell=/bin/sh -c “loolwsd-systemplate-setup /opt/lool/systemplate /opt/libreoffice >/dev/null 2>&1”

I tried configuring Ubuntu 16.04 in a virtual environment similar to my server configuration. I built ollabora with Docker on that Ubuntu. However, it is still an error in the same point. In Ubuntu it does not seem to matter that “/bin/sh” is “dash”.

The error is as follows.

The command ’ /bin/sh -c su lool --shell=/bin/sh -c “loolwsd-systemplate-setup /opt/lool/systemplate /opt/libreoffice >/dev/null 2>&1” ’ returned a non-zero code: 1

I’ve been looking at this error on the net, it seems to be out of memory or OS too new. How about this time? Even if the allocated memory was increased, it didn’t change. Or is there a missing component in my Ubuntu?

I was worried a lot, but the cause was that “loolwsd” could not be started. The reason seems to be because there was no certificate relation in /etc/loolwsd. I diverted it from the Docker container this time, but is there a correct way?

When I worked loolwsd, the font was recognized by Collabora without any problems. With this I can create an environment as a solution to the font problem.

I could display the font by this, but it seems I can’t prevent the collapse of the table size, raw heigh, cell width. The printable range also changes. Do I have to give up?

Another thing I care about is edit on Collabora on the Nextcloud and close it. Then mount NextCloud on Windows with WebDAV and edit and save it with MS Office. After that, when trying to open that file again by Collabora, a server error has definitely occurred.

1 Like

Let me check about the installation without Docker. I tried several times and as a result I was able to use Collabora without Docker.

Since I’m CentOS, I quoted from CentOS for the following site.

# import the signing key
wget https://www.collaboraoffice.com/repos/CollaboraOnline/CODE-centos7/repodata/repomd.xml.key && rpm --import repomd.xml.key
# add the repository URL to yum
yum-config-manager --add-repo https://www.collaboraoffice.com/repos/CollaboraOnline/CODE-centos7
# perform the installation
yum install loolwsd CODE-brand

Is the source of Collabora itself downloaded to the server and installed by this Yum install process?

I was also building a Docker image using Dockerfile at the suggestion of timar at the same time. Even if I stop Docker, Collabora can be used now, so Docker will not be involved.

Why did I have this question?
I had checked the components of the server, and an update had arrived in Collabora’s package. How about updating Collabora without Docker? I had such a question.

Do I update Collabora just by updating components? Or do I have to run Docker pull collabora/code again?

What I did this time.

  1. Server component update.
  2. yum update loolwsd CODE-brand
  3. docker pull collabora/code
  4. docker build -t mycollabora/code .
  5. systemctl daemon-reload
  6. systemcitl restart loolwsd
  7. Reconfigure Collabora Online server in Nextcloud. I had to intentionally press the apply button.

I can probably imagine that the third and fourth items are not necessary. Is this recognition that “is not necessary” correct? Processing by Docker is unnecessary.

Timar taught me “su lool --shell = / bin / sh ~~~”, because I wrote it in the Dockerfile, I could do it.
Do I still need Docker?

I thought, it got even more complicated. Please tell me.

I could align the font itself with Local(MS Office/LibreOffice) and Collabora, but after all I don’t seem to be able to prevent “design collapse”.
The width is still acceptable. The problem is height and line spacing. Due to this influence, the number of documents contained in one page becomes multiple pages.

Is there a way to fix the line spacing and cell height as original?

1 Like

I just copied my fonts into the docker container folder, restarted the container, and the new fonts were available.
sudo docker cp /usr/share/fonts/TTF/* quirky_swartz:/opt/collaboraoffice5.3/share/fonts/truetype/

“quicky_swartz” is the container name.

2 Likes