Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

How can I write "Java" in LaTeX so that the output looks as it is typeset on https://www.java.com/en/ (image below). For example \textsc{Java} doesn't look good. The image uses white text on red background, but it should just be normal black text.

Java typeset

share|improve this question

closed as off-topic by alfC, Svend Tveskæg, Jubobs, Werner, Adam Liter Apr 16 at 3:20

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center." – alfC, Svend Tveskæg, Jubobs, Werner, Adam Liter
If this question can be reworded to fit the rules in the help center, please edit the question.

3  
If you find the correct font, it can be done in LaTeX, so I believe that you will find better answers on graphicdesign.stackexchange.com with the typography tag. –  Hans-Peter E. Kristiansen Apr 10 at 8:52
    
Discussion on finding the name of the font can be found elsewhere. For example here: fontslogo.com/java-logo-font –  alfC Apr 10 at 9:01

2 Answers 2

up vote 18 down vote accepted

Not surprisingly, Sun Java logo uses Sun Semibold. As far as I can see it is not a free font. If you get it, you should get your result from XeLaTeX by doing:

\documentclass{article}
\usepackage{fontspec}
\setmainfont{sun_semibold.ttf}
\begin{document}
Java
\end{document}

The most I can do for you is to give you this bitmap produced by www.fonts.com, I expect you will get this with XeLaTeX:

java jred

Java©, the only language that had a marketing campaign budget. http://www.gotw.ca/publications/c_family_interview.htm

share|improve this answer
    
That seems great. According to fontslogo.com/java-logo-font, then Quattrocento Sans Bold Font is the closely related free font. Could you show how to use the font for only a word when using pdflatex? –  foens Apr 10 at 9:12
    
I think you can't with pdflatex, you have to use xelatex or lualatex. The simplest ways is to get your font in the same location as the document and use this tex.stackexchange.com/questions/169688/…. In my opion Quattrocento is not that similar. –  alfC Apr 10 at 9:30
    
Of course when it's used as a logo, there's nothing wrong with actually including it as a vector image. –  Christian Apr 10 at 20:12
    
@Christian, that's right and here it is commons.wikimedia.org/wiki/File:Java_logo_and_wordmark.svg –  alfC Apr 10 at 20:39

Quattrocento is possible, but different from sun:

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{quattrocento,xcolor}
\begin{document}
\Huge\sffamily
\colorbox{red}{\color{white}\textbf{Java}}

\textbf{Java}
\end{document}

enter image description here

share|improve this answer
    
There is even a package for Quattrocentro! Good to know. You don't need fontenc it seems. –  alfC Apr 10 at 9:38

Not the answer you're looking for? Browse other questions tagged or ask your own question.