Problem adding custom fonts in CSS from resource

Hi, I'm trying to brand my Nuxeo, and I created a bundle. Logo, CSS and other stuff are copied without problem to {NUXEO_HOME}/nxserver/nuxeo.war/

The problem is that I added some fonts in differents formats (EOT, TTF, WOFF…) and when the Nuxeo deploys the JAR Bundle, those font files are corruptly deployd. For example, original myFont.eot size is 54.096 bytes, but myFont.eot located at {NUXEO_HOME}/nxserver/nuxeo.war/fonts sizes 70.366 bytes after deploy.

Why those files incremented their size when I deployed the bundle?

I tried to put those files on /img, /incl, etc… but same result.

Any clue? Thanks in advice

0 votes

1 answers

1854 views

ANSWER



I answer myself. The corrupted files are caused by maven, not nuxeo. In order to solve this, in the bundle pom, this must be added:

    <plugin>
      <artifactId>maven-resources-plugin</artifactId>
      <version>2.5</version>
      <configuration>
        <encoding>UTF-8</encoding>
        <nonFilteredFileExtensions>
          <nonFilteredFileExtension>ttf</nonFilteredFileExtension>
          <nonFilteredFileExtension>eot</nonFilteredFileExtension>
          <nonFilteredFileExtension>woff</nonFilteredFileExtension>
        </nonFilteredFileExtensions>
      </configuration>
    </plugin>
0 votes