After dodging the issue in 2013, the Supreme Court on Friday signaled that it will finally decide whether bans on same-sex marriage violate the Fourteenth Amendment of the Constitution, accepting appeals to four lower court rulings that struck down such bans as unconstitutional.

The big question is whether the court will make gay marriage legal in all 50 states. We cannot be entirely certain, but supporters of same-sex marriage have reason to be optimistic. Let’s look at the various factions of the court, and how they will likely vote.

The No-Hopers
Nobody’s vote in these cases is more certain than Antonin Scalia’s. In various dissents to rulings that were favorable to LGBT rights, Scalia has railed against the “so-called homosexual agenda” and criticized his colleagues for “grim, disapproving hints" that Americans have been "guilty of ‘animus’ or ‘animosity’ toward homosexuality, as though that has been established as Unamerican.”

In his dissents to both Lawrence v. Texas (the 2003 decision that struck down bans on “sodomy”) and United States v. Windsor (the 2013 case that ruled key provisions of the federal Defense of Marriage Act unconstitutional), he asserted that the decisions logically required the court to ultimately recognize same-sex marriage rights — an eventuality that he clearly did not relish. (Some federal judges have trolled Scalia right back, gleefully citing this portion of his dissent when striking down bans on same-sex marriage.)

We can be very confident that Scalia will not find a constitutional right to same-sex marriage. The only outstanding question is how much spittle the court’s staff will have to clean up if Scalia decides to read his dissenting opinion from the bench.

Justice Clarence Thomas has been quieter about his opposition to same-sex marriage — he even wrote a short dissent in Lawrence distancing himself from Scalia’s homophobia — but he’s joined all of Scalia’s key opinions and will not break from Scalia here. Justice Samuel Alito is an even more consistent conservative party-liner than Scalia and Thomas, and argued in his own Windsor dissent, “The Constitution...does not dictate that choice [of whether to recognize same-sex marriages]. It leaves the choice to the people, acting through their elected representatives at both the federal and state levels.” He’s a certain third vote against same-sex marriage rights.

The Liberals
All four Democratic nominees to the court — Justices Stephen Breyer, Ruth Bader Ginsburg, Sonia Sotomayor, and Elena Kagan — are almost equally certain to find in favor of same-sex marriage rights. While the effect of Barack Obama’s postmature support for gay marriage tends to be overstated, it has played a decisive role in making that position an unshakable part of mainstream liberalism. It’s enormously unlikely, given the current partisan nature of the court, that any of the Democratic nominees will depart from the Democratic mainstream.

The only reason supporters of same-sex marriage might worry is that Justice Ginsburg has frequently, in the context of Roe v. Wade, spoken of the dangers of the court going too far, too fast in recognizing controversial rights claims. But now that same-sex marriage is legal in a majority of states, and public support has continued to increase, it's hard to see Ginsburg ducking the issue.

The Swing Vote
With the federal right to same-sex marriage almost certain to have four votes, the decision, as always, is likely to come down to the country’s most powerful judge, Anthony Kennedy. On its face, this is good news for liberals. Kennedy has a long history of sympathy for gay and lesbian rights — it was one reason conservatives distrusted him when Ronald Reagan gave him the nod. Kennedy has also written landmark opinions striking down anti-LBGT state initiatives, “sodomy” laws, and key parts of the Defense of Marriage Act. If Kennedy were to side with his typical conservative allies on this issue, it would be unprecedented.

That doesn’t necessarily make Kennedy a mortal lock for advocates of same-sex marriage. Making gay marriage legal in all 50 states would have an impact that goes well beyond, say, striking down rarely enforced bans on oral and anal sex. This case is somewhat unchartered waters. But still, it’s hard to imagine the 78-year-old Kennedy wanting his legacy to be defined by writing the Plessy v. Ferguson of gay and lesbian rights.

The Wild Card
The vote of Chief Justice John Roberts is the hardest to pin down. It’s also probably beside the point. The Supreme Court’s 2012 decision upholding much of the Affordable Care Act is the only time he’s joined the four liberals in a 5-4 opinion, and given that Kennedy is far more liberal on LBGT rights than he is on federalism and economics, it’s impossible to imagine a scenario in which Roberts votes to uphold a right to same-sex marriage and Kennedy doesn’t.

All things being equal, one would expect Roberts to join with his natural allies Scalia, Thomas, and Alito. Brianne Gorod and Judith E. Schaeffer make an interesting argument that Roberts should be considered highly likely to be a sixth vote to legalize same-sex marriage. I’m not entirely convinced, but either way I don’t think his vote will matter.

Speaking of wild cards: when the Supreme Court agreed to take the case its order asked the parties to address not only whether states are required “to license a marriage between two people of the same sex,” but also whether “the Fourteenth Amendment requires a state to recognize a marriage between two people of the same sex when their marriage was lawfully licensed and performed out-of-state.” I agree with the legal scholar Michael Dorf that it’s probably unwise to read too much into this. Still, there’s an outside chance that Kennedy and Roberts could compromise by reading the Constitution as requiring states to recognize valid same-sex marriages, but not that they have to license their own. The effects of such a ruling would be similar to a more sweeping affirmation of gay marriage, but would place a burden on poor couples in some states who would have to travel across state lines to become legally married.

Overall, advocates of same-sex marriage rights have good reason to be optimistic. But as fans of the Green Bay Packers will tell you, it’s unwise to celebrate prematurely.