Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8173468

Font.loadFont returns null on some Ubuntu 32bits

    Details

    • Subcomponent:
    • CPU:
      x86
    • OS:
      linux_ubuntu

      Backports

        Description

        FULL PRODUCT VERSION :
        java version "1.8.0_121"
        Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
        Java HotSpot(TM) Server VM (build 25.121-b13, mixed mode)

        ADDITIONAL OS VERSION INFORMATION :
        Out of the box Ubuntu 16.10 32 bits


        A DESCRIPTION OF THE PROBLEM :
        Related to this https://bitbucket.org/Jerady/fontawesomefx/issues/40/fontawesomefx-icons-displayed-as-garbage and this https://github.com/torakiki/pdfsam/issues/166

        Loading FontAwesome ttf font results in a Font instance in Ubuntu 64 bits and a null instance in an Ubuntu 32 bits. It seems it does affect only some users and the behavior seems the one described here http://mail.openjdk.java.net/pipermail/openjfx-dev/2016-March/018776.html

        EXPECTED VERSUS ACTUAL BEHAVIOR :
        EXPECTED -
        the Font is loaded
        ACTUAL -
        it returns null on some Ubuntu 32 bits

        REPRODUCIBILITY :
        This bug can be reproduced occasionally.

        ---------- BEGIN SOURCE ----------
        package my.test;

        import java.nio.file.Files;
        import java.nio.file.Paths;

        import javafx.application.Application;
        import javafx.scene.text.Font;
        import javafx.stage.Stage;

        public class App extends Application {

        private static final String FONT = "/home/torakiki/workspaces/test-fa/test-fa/src/my/test/fontawesome-webfont.ttf";
        public static void main(String[] args) {
        Application.launch(App.class, args);
        }

        @Override
        public void start(Stage primaryStage) throws Exception {
        Font font = Font.loadFont(Files.newInputStream(Paths.get(FONT)), 10.0d);
        System.out.println(font);
        }

        }
        ---------- END SOURCE ----------

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  vadim Vadim Pakhnushev
                  Reporter:
                  webbuggrp Webbug Group
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  6 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: