Learn CSS: Typography Font-Face III Help me please


#1

I can’t understand where is my mistake in adding Glegoo thing

@font-face {
font-family: Glegoo;
src: url(fonts/Glegoo-Regular.ttf) format(‘truetype’);
}
@font-face {
font-family: ‘Space Mono’;
font-style: normal;
font-weight: 400;
src: local(‘Space Mono’), local(‘SpaceMono-Regular’), url(https://fonts.gstatic.com/s/spacemono/v1/L1KCByOyogPfEIepxkwC2CEAvth_LlrfE80CYdSH47w.woff2) format(‘woff2’);
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
}

Please, help


#2

Your question will be better answered if a screenshot of your code in the editor is provided


#3

https://www.codecademy.com/courses/learn-css-typography/lessons/css-typography/exercises/font-face-iii?course_redirect=learn-css

@font-face {
  font-family: Glegoo;
  src: url(fonts/Glegoo-Regular.ttf) format('truetype'); 
}
@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 400;
  src: local('Space Mono'), local('SpaceMono-Regular'), url(https://fonts.gstatic.com/s/spacemono/v1/L1KCByOyogPfEIepxkwC2CEAvth_LlrfE80CYdSH47w.woff2) format('woff2');
  unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 700;
  src: local('Space Mono Bold'), local('SpaceMono-Bold'), url(https://fonts.gstatic.com/s/spacemono/v1/vdpMRWfyjfCvDYTz00NEPIWiMMZ7xLd792ULpGE4W_Y.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215;
}/* Universal Styles */

html {
  font-size: 16px;
  font-family: "Arial", sans-serif;
}


body {
  background-color: #F2F2F2;
}

h1 {
  color: white;
  font-size: 28px;
  font-family: Georgia;
  text-transform: uppercase;
  text-align: center;
}

h2 {
  font-size: 24px;
  font-weight: 700;
  line-height: 2.5;
  font-family: Georgia;
  word-spacing: 0.05em;
  letter-spacing: 0.02em;
}

a {
  text-decoration: none;
}

p {
  margin: 16px 0;
  line-height: 1.4;
  font-family: Helvetica;
}

strong {
  font-weight: bold;
}

#serif, /* Offset linked sections to account for header. */
#sans,
#mono {
  padding-top: 77px;
  margin-top: -77px;
}

/* Header */

.header {
  font-family: "Arial", sans-serif;
  font-size: 14px;
  line-height: 1.25;
  background-color: #fff;
  position: fixed;
  top: 0;
  width: 100%;
  font-weight: 900;
}

.header li {
  display: inline-block;
}

.header a {
  display: block;
  color: #4A4A4A;
  padding: 30px 20px;
}

a.home {
  color: #4D00FF;
}


/* Banner Section */

#4

I add a link to my lesson,
can’t add a screenshot, sorry again


#5

Ok!

It’s like the /* Universal Styles */ @font-face you are using is the one causing the error.

Use only the /* Latin Styles */


#6

I chose Latin Styles. It was in the previous task . My problem is an error with this task:

Within the @font-face rule, add a src attribute with the relative path of the file Glegoo-Regular.ttf and a format of truetype.

It seems to me I did absolutle the same as in the example< but I have this: Did you add a ‘…/fonts/Glegoo-Regular.ttf’ value to the format value?


#7

Copy that same part and replace this: src: url(fonts/Glegoo-Regular.ttf)

As in: src: url(…/fonts/Glegoo-Regular.ttf)


#8

No, still doesn’t work…
It makes me crazy


#9

Thank you. Your advise was absolutly correct.


#10

@font-face {
font-family: ‘Glegoo’;
src: url(’…/fonts/Glegoo-Regular.ttf’) format(‘truetype’);

For some reason, this worked for me. I put … into the relative path. I’m still not sure why adding those two periods worked though.


#11

teraplayer68669;

As i noticed the problem is with dots (use 2 dots not 3)
Exactly copy the notification which tells you what to do.


#12

The problem with this exercise is that the syntax used in the example is
src: url(fonts/Glegoo-Regular.ttf) format(‘truetype’);

However, the only accepted syntax is ONLY in the error, which is

src: url(’…/fonts/Glegoo-Regular.ttf’) format(‘truetype’);

Whoever wrote this lesson needs a swift kick. :stuck_out_tongue:


#13

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.